[Xfce4-commits] <xfce4-settings:master> Select the first item of the channel list when loading channels.
Jérôme Guelfucci
noreply at xfce.org
Tue Jan 19 19:34:18 CET 2010
Updating branch refs/heads/master
to 2aed34bc461935ac6cf48dd41fe9375faeccfdde (commit)
from f7531faf2fc895a9ff9aff219bab68bffb980822 (commit)
commit 2aed34bc461935ac6cf48dd41fe9375faeccfdde
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