summaryrefslogtreecommitdiff
path: root/panels/search
diff options
context:
space:
mode:
authorFelipe Borges <felipeborges@gnome.org>2019-07-02 16:22:30 +0200
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2019-08-06 11:59:41 +0000
commitc173424c110c6f5537a8c12ad40b56dfd53f603e (patch)
tree334335bbabd81a3b261c2334c0401de4020cddd2 /panels/search
parentdb39bd159f0fb4d72329a0c685165fb8f26f6d35 (diff)
downloadgnome-control-center-c173424c110c6f5537a8c12ad40b56dfd53f603e.tar.gz
search: Move "Search Locations" button to top bar
Fixes #591
Diffstat (limited to 'panels/search')
-rw-r--r--panels/search/cc-search-panel.c4
-rw-r--r--panels/search/cc-search-panel.ui35
2 files changed, 10 insertions, 29 deletions
diff --git a/panels/search/cc-search-panel.c b/panels/search/cc-search-panel.c
index f4765556b..86049636a 100644
--- a/panels/search/cc-search-panel.c
+++ b/panels/search/cc-search-panel.c
@@ -703,6 +703,7 @@ cc_search_panel_constructed (GObject *object)
G_BINDING_DEFAULT |
G_BINDING_SYNC_CREATE);
+ cc_shell_embed_widget_in_header (cc_panel_get_shell (CC_PANEL (self)), self->settings_button, GTK_POS_LEFT);
cc_shell_embed_widget_in_header (cc_panel_get_shell (CC_PANEL (self)), box, GTK_POS_RIGHT);
}
@@ -725,8 +726,6 @@ cc_search_panel_init (CcSearchPanel *self)
G_CALLBACK (down_button_clicked), self);
gtk_widget_set_sensitive (self->down_button, FALSE);
- g_signal_connect (self->settings_button, "clicked",
- G_CALLBACK (settings_button_clicked), self);
gtk_widget_set_sensitive (self->settings_button, cc_search_locations_dialog_is_available ());
self->search_settings = g_settings_new ("org.gnome.desktop.search-providers");
@@ -760,4 +759,5 @@ cc_search_panel_class_init (CcSearchPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcSearchPanel, settings_button);
gtk_widget_class_bind_template_callback (widget_class, search_panel_invalidate_button_state);
+ gtk_widget_class_bind_template_callback (widget_class, settings_button_clicked);
}
diff --git a/panels/search/cc-search-panel.ui b/panels/search/cc-search-panel.ui
index e93c6647b..ffff72042 100644
--- a/panels/search/cc-search-panel.ui
+++ b/panels/search/cc-search-panel.ui
@@ -97,33 +97,6 @@
<property name="expand">True</property>
</packing>
</child>
- <child>
- <object class="GtkToolItem" id="settings_item">
- <property name="visible">True</property>
- <child>
- <object class="GtkBox" id="i_s_ud_box">
- <property name="visible">True</property>
- <child>
- <object class="GtkButton" id="settings_button">
- <property name="visible">True</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="settings_button_a11y">
- <property name="accessible-name" translatable="yes">Preferences</property>
- </object>
- </child>
- <child>
- <object class="GtkImage" id="settings_image">
- <property name="visible">True</property>
- <property name="icon-name">emblem-system-symbolic</property>
- <property name="icon-size">1</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -138,4 +111,12 @@
</object>
</child>
</template>
+
+ <!-- Header widget -->
+ <object class="GtkButton" id="settings_button">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="label" translatable="yes">Search Locations</property>
+ <signal name="clicked" handler="settings_button_clicked" object="CcSearchPanel" swapped="no"/>
+ </object>
</interface>