diff options
author | Burt P <pburt0@gmail.com> | 2017-09-25 17:05:26 -0500 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2017-09-26 07:51:50 -0700 |
commit | 35c0821817b976fdd627b6b7c68e3f0777352e35 (patch) | |
tree | d46d7bdefdf3d4811deadbd400013dc01ac185c5 | |
parent | 8dd47efa485e65c56c67d242873baaa346c66f7b (diff) |
shell: select Computer Summary at start
Signed-off-by: Burt P <pburt0@gmail.com>
-rw-r--r-- | shell/shell.c | 14 |
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) |