[Xfce4-commits] <xfce4-settings:jeromeg/settings-editor> Sort the contents of the tree views.

Jérôme Guelfucci noreply at xfce.org
Sat Jan 16 11:48:01 CET 2010


Updating branch refs/heads/jeromeg/settings-editor
         to 9fb05321f3c760cd86b0e265b7b9f39a34983eee (commit)
       from aaa49010d28180a9f8e5e59ec2a1d965051e9b44 (commit)

commit 9fb05321f3c760cd86b0e265b7b9f39a34983eee
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Fri Jan 15 16:56:25 2010 +0100

    Sort the contents of the tree views.

 xfce4-settings-editor/main_window.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/xfce4-settings-editor/main_window.c b/xfce4-settings-editor/main_window.c
index 57b9a57..d090d3f 100644
--- a/xfce4-settings-editor/main_window.c
+++ b/xfce4-settings-editor/main_window.c
@@ -152,6 +152,9 @@ xfce4_settings_editor_main_window_new(void)
     renderer = gtk_cell_renderer_text_new();
     gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (channel_treeview), 1, _("Channel"), renderer, "text", 0, NULL);
 
+    /* Set sorting */
+    gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (channel_tree_store), 0, GTK_SORT_ASCENDING);
+
     /*
      * property list
      */
@@ -177,6 +180,9 @@ xfce4_settings_editor_main_window_new(void)
     gtk_tree_view_column_set_resizable (gtk_tree_view_get_column (GTK_TREE_VIEW (property_treeview), 2), TRUE);
     gtk_tree_view_column_set_resizable (gtk_tree_view_get_column (GTK_TREE_VIEW (property_treeview), 3), TRUE);
 
+    /* Set sorting */
+    gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (property_tree_store), 0, GTK_SORT_ASCENDING);
+
     /* improve usability by expanding nodes when clicking on them */
     g_signal_connect (G_OBJECT (property_treeview), "row-activated", G_CALLBACK (cb_property_treeview_row_activated), builder);
 



More information about the Xfce4-commits mailing list