# HG changeset patch # User Stu Tomlinson # Date 1100106512 0 # Node ID cf45c2a6a7cfa4afaa7184a930eb191d4c89db8a # Parent 72c9e9bb2c197c0f569a4cdd5473dad93377a9b4 [gaim-migrate @ 11254] Some stuff - fix a crash removing chats from the buddy list, escape aliases in buddy pounce popups and the state notifications from the state notify plugin, and fix a corner-case crash in smiley theme sorting. committer: Tailor Script diff -r 72c9e9bb2c19 -r cf45c2a6a7cf plugins/statenotify.c --- a/plugins/statenotify.c Tue Nov 09 05:48:26 2004 +0000 +++ b/plugins/statenotify.c Wed Nov 10 17:08:32 2004 +0000 @@ -18,6 +18,7 @@ GaimConversation *conv; const char *who; char buf[256]; + char *escaped; conv = gaim_find_conversation_with_account(buddy->name, buddy->account); @@ -25,8 +26,10 @@ return; who = gaim_buddy_get_alias(buddy); + escaped = g_markup_escape_text(who, -1); - g_snprintf(buf, sizeof(buf), message, who); + g_snprintf(buf, sizeof(buf), message, escaped); + g_free(escaped); gaim_conversation_write(conv, NULL, buf, GAIM_MESSAGE_SYSTEM, time(NULL)); } diff -r 72c9e9bb2c19 -r cf45c2a6a7cf src/gtkdialogs.c --- a/src/gtkdialogs.c Tue Nov 09 05:48:26 2004 +0000 +++ b/src/gtkdialogs.c Wed Nov 10 17:08:32 2004 +0000 @@ -870,15 +870,18 @@ gaim_gtkdialogs_remove_chat_cb(GaimChat *chat) { char *name = NULL; + GaimAccount *account; GaimConversation *conv = NULL; - if (GAIM_PLUGIN_PROTOCOL_INFO(chat->account->gc->prpl)->get_chat_name != NULL) - name = GAIM_PLUGIN_PROTOCOL_INFO(chat->account->gc->prpl)->get_chat_name(chat->components); + account = chat->account; + + if (GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name != NULL) + name = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name(chat->components); gaim_blist_remove_chat(chat); if (name != NULL) { - conv = gaim_find_conversation_with_account(name, chat->account); + conv = gaim_find_conversation_with_account(name, account); g_free(name); } diff -r 72c9e9bb2c19 -r cf45c2a6a7cf src/gtkpounce.c --- a/src/gtkpounce.c Tue Nov 09 05:48:26 2004 +0000 +++ b/src/gtkpounce.c Wed Nov 10 17:08:32 2004 +0000 @@ -949,6 +949,9 @@ { char tmp[1024]; const char *name_shown; + char *escaped; + + escaped = g_markup_escape_text(alias, -1); /* * Here we place the protocol name in the pounce dialog to lessen @@ -972,7 +975,9 @@ (events & GAIM_POUNCE_AWAY) ? _("%s has gone away. (%s)") : _("Unknown pounce event. Please report this!"), - alias, gaim_account_get_protocol_name(account)); + escaped, gaim_account_get_protocol_name(account)); + + g_free(escaped); /* * Ok here is where I change the second argument, title, from diff -r 72c9e9bb2c19 -r cf45c2a6a7cf src/gtkprefs.c --- a/src/gtkprefs.c Tue Nov 09 05:48:26 2004 +0000 +++ b/src/gtkprefs.c Wed Nov 10 17:08:32 2004 +0000 @@ -608,8 +608,11 @@ if (!(name1 == NULL && name2 == NULL)) ret = (name1 == NULL) ? -1: 1; } else if (!g_ascii_strcasecmp(name1, "none")) { - /* Sort name1 first */ - ret = -1; + if (!g_utf8_collate(name1, name2)) + ret = 0; + else + /* Sort name1 first */ + ret = -1; } else if (!g_ascii_strcasecmp(name2, "none")) { /* Sort name2 first */ ret = 1;