ekiga r6725 - trunk/src/gui
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6725 - trunk/src/gui
- Date: Thu, 28 Aug 2008 20:44:22 +0000 (UTC)
Author: dsandras
Date: Thu Aug 28 20:44:21 2008
New Revision: 6725
URL: http://svn.gnome.org/viewvc/ekiga?rev=6725&view=rev
Log:
Automatically sorts using the "enabled" column.
Modified:
trunk/src/gui/accounts.cpp
Modified: trunk/src/gui/accounts.cpp
==============================================================================
--- trunk/src/gui/accounts.cpp (original)
+++ trunk/src/gui/accounts.cpp Thu Aug 28 20:44:21 2008
@@ -507,6 +507,7 @@
GtkWidget *frame = NULL;
GtkWidget *hbox = NULL;
+ GtkTreeModel *model = NULL;
GtkCellRenderer *renderer = NULL;
GtkListStore *list_store = NULL;
GtkTreeViewColumn *column = NULL;
@@ -579,6 +580,7 @@
NULL);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 25);
gtk_tree_view_append_column (GTK_TREE_VIEW (aw->accounts_list), column);
+ gtk_tree_view_column_set_sort_column_id (column, COLUMN_ACCOUNT_ENABLED);
g_signal_connect (G_OBJECT (renderer), "toggled",
G_CALLBACK (account_toggled_cb),
(gpointer) window);
@@ -600,11 +602,14 @@
gtk_tree_view_column_set_resizable (GTK_TREE_VIEW_COLUMN (column), TRUE);
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_AUTOSIZE);
- if (i == COLUMN_ACCOUNT_ACCOUNT_NAME)
- gtk_tree_view_column_set_sort_column_id (column,
- COLUMN_ACCOUNT_ACCOUNT_NAME);
+ gtk_tree_view_column_set_sort_column_id (column, i);
}
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (aw->accounts_list));
+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model),
+ COLUMN_ACCOUNT_ENABLED,
+ GTK_SORT_DESCENDING);
+
g_signal_connect (G_OBJECT (aw->accounts_list), "event_after",
G_CALLBACK (account_clicked_cb), window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]