From 35c0821817b976fdd627b6b7c68e3f0777352e35 Mon Sep 17 00:00:00 2001 From: Burt P Date: Mon, 25 Sep 2017 17:05:26 -0500 Subject: shell: select Computer Summary at start Signed-off-by: Burt P --- shell/shell.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'shell/shell.c') diff --git a/shell/shell.c b/shell/shell.c index ee031bfd..b37f1ad8 100644 --- a/shell/shell.c +++ b/shell/shell.c @@ -701,6 +701,17 @@ ShellSummary *summary_new(void) return summary; } +static gboolean +select_first_tree_item(gpointer data) +{ + GtkTreeIter first; + + if (gtk_tree_model_get_iter_first(shell->tree->model, &first)) + gtk_tree_selection_select_iter(shell->tree->selection, &first); + + return FALSE; +} + void shell_init(GSList * modules) { if (shell) { @@ -770,6 +781,9 @@ void shell_init(GSList * modules) #else shell_action_set_enabled("SyncManagerAction", sync_manager_count_entries() > 0); #endif + + /* Should select Computer Summary (note: not Computer/Summary) */ + g_idle_add(select_first_tree_item, NULL); } static gboolean update_field(gpointer data) -- cgit v1.2.3