soc.2008.finch: c63a120d: Sort the rooms by name (case-sensitive).
queueram at soc.pidgin.im
queueram at soc.pidgin.im
Thu Sep 18 00:45:34 EDT 2008
-----------------------------------------------------------------
Revision: c63a120d2471cc17514c68853d43c9a5901a977f
Ancestor: 6be3675c90d16d79383d2ec323777722a711ad16
Author: queueram at soc.pidgin.im
Date: 2008-09-18T04:41:25
Branch: im.pidgin.soc.2008.finch
URL: http://d.pidgin.im/viewmtn/revision/info/c63a120d2471cc17514c68853d43c9a5901a977f
Modified files:
finch/gntroomlist.c
ChangeLog:
Sort the rooms by name (case-sensitive).
-------------- next part --------------
============================================================
--- finch/gntroomlist.c b95a84030822eb9b3082af8a41a6a10b9a4a0a0f
+++ finch/gntroomlist.c 0f06727bdbddee8e3bee82cc5ed81af6c3e6ec69
@@ -259,6 +259,12 @@ size_changed_cb(GntWidget *widget, int o
purple_prefs_set_int(PREF_ROOT "/size/height", h);
}
+static int
+room_compare(PurpleRoomlistRoom *r1, PurpleRoomlistRoom *r2)
+{
+ return g_utf8_collate(r1->name, r2->name);
+}
+
static void
setup_roomlist(PurpleAccount *account)
{
@@ -300,6 +306,7 @@ setup_roomlist(PurpleAccount *account)
gnt_tree_set_col_width(GNT_TREE(tree), 1, 1);
gnt_tree_set_column_resizable(GNT_TREE(tree), 1, FALSE);
gnt_tree_set_search_column(GNT_TREE(tree), 0);
+ gnt_tree_set_compare_func(GNT_TREE(tree), (GCompareFunc)room_compare);
gnt_box_add_widget(GNT_BOX(window), tree);
More information about the Commits
mailing list