Mercurial > pidgin.yaz
diff console/gntplugin.c @ 14105:eaf7f35635bc
[gaim-migrate @ 16739]
Allow autojoining chat rooms.
Sort the buddies in the buddylist, and the plugins in the plugin list.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 13 Aug 2006 23:30:19 +0000 |
parents | 2d1b41e3cf0d |
children | 44ec6c7cbc76 |
line wrap: on
line diff
--- a/console/gntplugin.c Sun Aug 13 08:41:07 2006 +0000 +++ b/console/gntplugin.c Sun Aug 13 23:30:19 2006 +0000 @@ -68,6 +68,7 @@ gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(plugins.aboot), text, GNT_TEXT_FLAG_NORMAL); gnt_text_view_scroll(GNT_TEXT_VIEW(plugins.aboot), 0); + g_free(text); } static void @@ -78,6 +79,17 @@ plugins.aboot = NULL; } +static int +plugin_compare(GaimPlugin *p1, GaimPlugin *p2) +{ + char *s1 = g_utf8_strup(p1->info->name, -1); + char *s2 = g_utf8_strup(p2->info->name, -1); + int ret = g_utf8_collate(s1, s2); + g_free(s1); + g_free(s2); + return ret; +} + void gg_plugins_show_all() { GntWidget *window, *tree, *box, *aboot; @@ -102,6 +114,7 @@ gnt_box_set_pad(GNT_BOX(box), 0); plugins.tree = tree = gnt_tree_new(); + gnt_tree_set_compare_func(GNT_TREE(tree), (GCompareFunc)plugin_compare); GNT_WIDGET_SET_FLAGS(tree, GNT_WIDGET_NO_BORDER); gnt_box_add_widget(GNT_BOX(box), tree); gnt_box_add_widget(GNT_BOX(box), gnt_vline_new()); @@ -128,8 +141,6 @@ g_signal_connect(G_OBJECT(tree), "selection_changed", G_CALLBACK(selection_changed), NULL); g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(reset_plugin_window), NULL); - gnt_tree_set_selected(GNT_TREE(tree), gaim_plugins_get_all()->data); - gnt_widget_show(window); }