diff options
author | Richard Laager <rlaager@pidgin.im> | 2007-05-20 18:32:40 +0000 |
---|---|---|
committer | Richard Laager <rlaager@pidgin.im> | 2007-05-20 18:32:40 +0000 |
commit | 4c54d7a249ea174e57cae95898a720293e025d2e (patch) | |
tree | 9d542df4a43ba0772fd40b8c91c20c21ee9a0678 | |
parent | 2059a878165fe8aa3c4de99337e6c400f9b449cf (diff) | |
parent | c2b10f19e527998c7e554ede847b88323d84a194 (diff) | |
download | pidgin-4c54d7a249ea174e57cae95898a720293e025d2e.tar.gz |
merge of '4e76faf2341ef0fa883755bd8e57432f403b7b51'
and '05ece7b80efc1932353a719bd0ac93c321c8a702'
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | libpurple/util.c | 2 | ||||
-rw-r--r-- | pidgin/gtkconv.c | 16 |
3 files changed, 16 insertions, 3 deletions
@@ -42,6 +42,7 @@ version 2.0.1 (??/??/????): and the XScreenSaver change will reduce Pidgin's effect on power consumption when running with NO_HZ. (Arjan van de Ven with Intel Corporation) + * Conversation -> Save As will now use aliases. Finch: * Userlist in chat windows, which can be turned on or off using diff --git a/libpurple/util.c b/libpurple/util.c index c149a2e8ff..cbec125909 100644 --- a/libpurple/util.c +++ b/libpurple/util.c @@ -4212,7 +4212,7 @@ purple_escape_filename(const char *str) gunichar c = g_utf8_get_char(iter); /* If the character is an ASCII character and is alphanumeric, * or one of the specified values, no need to escape */ - if (c < 128 && (isalnum(c) || c == '@' || c == '-' || + if (c < 128 && (g_ascii_isalnum(c) || c == '@' || c == '-' || c == '_' || c == '.' || c == '#')) { buf[j++] = c; } else { diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c index e523720548..d65685a547 100644 --- a/pidgin/gtkconv.c +++ b/pidgin/gtkconv.c @@ -1012,12 +1012,24 @@ menu_save_as_cb(gpointer data, guint action, GtkWidget *widget) { PidginWindow *win = data; PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win); + PurpleBuddy *buddy = purple_find_buddy(conv->account, conv->name); + const char *name; gchar *buf; + gchar *c; - buf = g_strdup_printf("%s.html", purple_normalize(conv->account, conv->name)); + if (buddy != NULL) + name = purple_buddy_get_contact_alias(buddy); + else + name = purple_normalize(conv->account, conv->name); + buf = g_strdup_printf("%s.html", name); + for (c = buf ; *c ; c++) + { + if (*c == '/' || *c == '\\') + *c = ' '; + } purple_request_file(PIDGIN_CONVERSATION(conv), _("Save Conversation"), - purple_escape_filename(buf), + buf, TRUE, G_CALLBACK(savelog_writefile_cb), NULL, NULL, NULL, conv, conv); |