[gnome-photos/wip/search: 15/15] main-toolbar: Add a search button
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/search: 15/15] main-toolbar: Add a search button
- Date: Thu, 23 Jan 2014 09:44:02 +0000 (UTC)
commit 56c9a1d77c79f7b45bb704dd08ccd2a56fe5767d
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Jan 22 12:01:22 2014 +0100
main-toolbar: Add a search button
src/photos-main-toolbar.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index 3fb4ee0..0a68cb0 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -271,6 +271,21 @@ photos_main_toolbar_add_remote_display_button (PhotosMainToolbar *self)
}
+static GtkWidget *
+photos_main_toolbar_add_search_button (PhotosMainToolbar *self)
+{
+ GtkWidget *search_button;
+
+ search_button = gd_header_toggle_button_new ();
+ gd_header_button_set_label (GD_HEADER_BUTTON (search_button), _("Search"));
+ gd_header_button_set_symbolic_icon_name (GD_HEADER_BUTTON (search_button), "edit-find-symbolic");
+ gtk_actionable_set_action_name (GTK_ACTIONABLE (search_button), "app.search");
+ gtk_header_bar_pack_end (GTK_HEADER_BAR (self->priv->toolbar), search_button);
+
+ return search_button;
+}
+
+
static void
photos_main_toolbar_add_selection_button (PhotosMainToolbar *self)
{
@@ -415,6 +430,7 @@ photos_main_toolbar_populate_for_collections (PhotosMainToolbar *self)
gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (priv->toolbar), TRUE);
photos_header_bar_set_mode (PHOTOS_HEADER_BAR (priv->toolbar), PHOTOS_HEADER_BAR_MODE_NORMAL);
photos_main_toolbar_add_selection_button (self);
+ photos_main_toolbar_add_search_button (self);
priv->searchbar = photos_main_toolbar_create_overview_searchbar (self);
gtk_container_add (GTK_CONTAINER (self), priv->searchbar);
@@ -451,6 +467,7 @@ photos_main_toolbar_populate_for_favorites (PhotosMainToolbar *self)
gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (priv->toolbar), TRUE);
photos_header_bar_set_mode (PHOTOS_HEADER_BAR (priv->toolbar), PHOTOS_HEADER_BAR_MODE_NORMAL);
photos_main_toolbar_add_selection_button (self);
+ photos_main_toolbar_add_search_button (self);
priv->searchbar = photos_main_toolbar_create_overview_searchbar (self);
gtk_container_add (GTK_CONTAINER (self), priv->searchbar);
@@ -469,6 +486,7 @@ photos_main_toolbar_populate_for_overview (PhotosMainToolbar *self)
gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (priv->toolbar), TRUE);
photos_header_bar_set_mode (PHOTOS_HEADER_BAR (priv->toolbar), PHOTOS_HEADER_BAR_MODE_NORMAL);
photos_main_toolbar_add_selection_button (self);
+ photos_main_toolbar_add_search_button (self);
priv->searchbar = photos_main_toolbar_create_overview_searchbar (self);
gtk_container_add (GTK_CONTAINER (self), priv->searchbar);
@@ -534,6 +552,8 @@ photos_main_toolbar_populate_for_selection_mode (PhotosMainToolbar *self)
G_CALLBACK (photos_main_toolbar_set_toolbar_title),
self,
G_CONNECT_SWAPPED);
+
+ photos_main_toolbar_add_search_button (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]