aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGabriel Millaire <millaire.gabriel@gmail.com>2009-05-07 08:05:45 +0800
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>2009-05-07 08:05:45 +0800
commitc46629ff522f239a5f5459ac6e96ab1ed2015354 (patch)
treea4e3b4955f67b25645dd54aa730f86b3c54ff672 /src
parent209c85e7791508d2de014ae1ec68c7e37515aee5 (diff)
downloadgsoc2013-empathy-c46629ff522f239a5f5459ac6e96ab1ed2015354.tar
gsoc2013-empathy-c46629ff522f239a5f5459ac6e96ab1ed2015354.tar.gz
gsoc2013-empathy-c46629ff522f239a5f5459ac6e96ab1ed2015354.tar.bz2
gsoc2013-empathy-c46629ff522f239a5f5459ac6e96ab1ed2015354.tar.lz
gsoc2013-empathy-c46629ff522f239a5f5459ac6e96ab1ed2015354.tar.xz
gsoc2013-empathy-c46629ff522f239a5f5459ac6e96ab1ed2015354.tar.zst
gsoc2013-empathy-c46629ff522f239a5f5459ac6e96ab1ed2015354.zip
Fixed bug #579485 by making each columns sortable
Diffstat (limited to 'src')
-rw-r--r--src/empathy-new-chatroom-dialog.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c
index 837d9acfe..1861993e8 100644
--- a/src/empathy-new-chatroom-dialog.c
+++ b/src/empathy-new-chatroom-dialog.c
@@ -75,6 +75,7 @@ enum {
COL_NAME,
COL_ROOM,
COL_MEMBERS,
+ COL_MEMBERS_INT,
COL_TOOLTIP,
COL_COUNT
};
@@ -253,6 +254,7 @@ new_chatroom_dialog_model_setup (EmpathyNewChatroomDialog *dialog)
G_TYPE_STRING, /* Name */
G_TYPE_STRING, /* Room */
G_TYPE_STRING, /* Member count */
+ G_TYPE_INT, /* Member count int */
G_TYPE_STRING); /* Tool tip */
dialog->model = GTK_TREE_MODEL (store);
@@ -295,12 +297,16 @@ new_chatroom_dialog_model_add_columns (EmpathyNewChatroomDialog *dialog)
cell,
"stock-id", COL_INVITE_ONLY,
NULL);
+
+ gtk_tree_view_column_set_sort_column_id (column, COL_INVITE_ONLY);
gtk_tree_view_append_column (view, column);
column = gtk_tree_view_column_new_with_attributes (NULL,
cell,
"stock-id", COL_NEED_PASSWORD,
NULL);
+
+ gtk_tree_view_column_set_sort_column_id (column, COL_NEED_PASSWORD);
gtk_tree_view_append_column (view, column);
cell = gtk_cell_renderer_text_new ();
@@ -315,6 +321,7 @@ new_chatroom_dialog_model_add_columns (EmpathyNewChatroomDialog *dialog)
"text", COL_NAME,
NULL);
+ gtk_tree_view_column_set_sort_column_id (column, COL_NAME);
gtk_tree_view_column_set_expand (column, TRUE);
gtk_tree_view_append_column (view, column);
@@ -329,6 +336,8 @@ new_chatroom_dialog_model_add_columns (EmpathyNewChatroomDialog *dialog)
cell,
"text", COL_MEMBERS,
NULL);
+
+ gtk_tree_view_column_set_sort_column_id (column, COL_MEMBERS_INT);
gtk_tree_view_append_column (view, column);
}
@@ -463,6 +472,7 @@ new_chatroom_dialog_new_room_cb (EmpathyTpRoomlist *room_list,
COL_NAME, empathy_chatroom_get_name (chatroom),
COL_ROOM, empathy_chatroom_get_room (chatroom),
COL_MEMBERS, members,
+ COL_MEMBERS_INT, empathy_chatroom_get_members_count (chatroom),
COL_TOOLTIP, tooltip,
-1);