[gnome-control-center/gbsneto/search-applications: 7/10] applications: Select the first row at startup
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gbsneto/search-applications: 7/10] applications: Select the first row at startup
- Date: Mon, 1 Apr 2019 22:28:18 +0000 (UTC)
commit 6b5d8a93b6e85a379422563aee8668b9dbed2f49
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Apr 1 18:28:10 2019 -0300
applications: Select the first row at startup
That way we are not presented the empty view initially.
panels/applications/cc-applications-panel.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/panels/applications/cc-applications-panel.c b/panels/applications/cc-applications-panel.c
index 5a4593d3b..21a34bb4d 100644
--- a/panels/applications/cc-applications-panel.c
+++ b/panels/applications/cc-applications-panel.c
@@ -1662,6 +1662,7 @@ static void
cc_applications_panel_init (CcApplicationsPanel *self)
{
g_autoptr(GtkStyleProvider) provider = NULL;
+ GtkListBoxRow *row;
g_resources_register (cc_applications_get_resource ());
@@ -1731,4 +1732,9 @@ cc_applications_panel_init (CcApplicationsPanel *self)
self->globs = parse_globs ();
self->search_providers = parse_search_providers ();
+
+ /* Select the first row */
+ row = gtk_list_box_get_row_at_index (self->sidebar_listbox, 0);
+ gtk_list_box_select_row (self->sidebar_listbox, row);
+ g_signal_emit_by_name (row, "activate");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]