aboutsummaryrefslogtreecommitdiff
path: root/shell/shell.c
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2017-09-25 17:05:26 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2017-09-26 07:51:50 -0700
commit35c0821817b976fdd627b6b7c68e3f0777352e35 (patch)
treed46d7bdefdf3d4811deadbd400013dc01ac185c5 /shell/shell.c
parent8dd47efa485e65c56c67d242873baaa346c66f7b (diff)
shell: select Computer Summary at start
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'shell/shell.c')
-rw-r--r--shell/shell.c14
1 files changed, 14 insertions, 0 deletions
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)