[Xfce4-commits] <xfce4-settings:jeromeg/settings-editor> Select the first item of the channel list when loading channels.
Jérôme Guelfucci
noreply at xfce.org
Fri Jan 8 16:38:02 CET 2010
Updating branch refs/heads/jeromeg/settings-editor
to 53436fc69215a9d369ad50776f12fb2c695e299b (commit)
from 1acb852c0a1e5ee9bfa1ea28d3a740b76caa4d63 (commit)
commit 53436fc69215a9d369ad50776f12fb2c695e299b
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date: Fri Jan 8 16:40:00 2010 +0100
Select the first item of the channel list when loading channels.
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 0a50d9c..02a5a01 100644
--- a/xfce4-settings-editor/main_window.c
+++ b/xfce4-settings-editor/main_window.c
@@ -210,6 +210,8 @@ load_channels (GtkListStore *store, GtkTreeView *treeview)
channel_names = xfconf_list_channels();
if (channel_names != NULL)
{
+ GtkTreeSelection *selection;
+
_channel_names_iter = channel_names;
while (*_channel_names_iter)
{
@@ -222,6 +224,10 @@ load_channels (GtkListStore *store, GtkTreeView *treeview)
_channel_names_iter++;
}
g_strfreev (channel_names);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
+ if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter))
+ gtk_tree_selection_select_iter (selection, &iter);
}
}
More information about the Xfce4-commits
mailing list