pidgin/gtkconv.c

changeset 17262
05ece7b80efc
parent 17185
aee12ae11898
child 17298
b69ba13b3b94
child 18081
af151ffded48
equal deleted inserted replaced
17261:65aa3164dcce 17262:05ece7b80efc
1010 static void 1010 static void
1011 menu_save_as_cb(gpointer data, guint action, GtkWidget *widget) 1011 menu_save_as_cb(gpointer data, guint action, GtkWidget *widget)
1012 { 1012 {
1013 PidginWindow *win = data; 1013 PidginWindow *win = data;
1014 PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win); 1014 PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win);
1015 PurpleBuddy *buddy = purple_find_buddy(conv->account, conv->name);
1016 const char *name;
1015 gchar *buf; 1017 gchar *buf;
1016 1018 gchar *c;
1017 buf = g_strdup_printf("%s.html", purple_normalize(conv->account, conv->name)); 1019
1018 1020 if (buddy != NULL)
1021 name = purple_buddy_get_contact_alias(buddy);
1022 else
1023 name = purple_normalize(conv->account, conv->name);
1024
1025 buf = g_strdup_printf("%s.html", name);
1026 for (c = buf ; *c ; c++)
1027 {
1028 if (*c == '/' || *c == '\\')
1029 *c = ' ';
1030 }
1019 purple_request_file(PIDGIN_CONVERSATION(conv), _("Save Conversation"), 1031 purple_request_file(PIDGIN_CONVERSATION(conv), _("Save Conversation"),
1020 purple_escape_filename(buf), 1032 buf,
1021 TRUE, G_CALLBACK(savelog_writefile_cb), NULL, 1033 TRUE, G_CALLBACK(savelog_writefile_cb), NULL,
1022 NULL, NULL, conv, 1034 NULL, NULL, conv,
1023 conv); 1035 conv);
1024 1036
1025 g_free(buf); 1037 g_free(buf);

mercurial