[gnome-photos] icons, overview-searchbar: Replace GtkArrow with GtkImage
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] icons, overview-searchbar: Replace GtkArrow with GtkImage
- Date: Tue, 9 Sep 2014 16:15:29 +0000 (UTC)
commit 780c30fab9edffb3efe958266564bf7ec07fe389
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Aug 13 22:20:23 2014 +0200
icons, overview-searchbar: Replace GtkArrow with GtkImage
GtkArrow is deprecated and supposed to be replaced by a GtkImage with
a suitable icon name.
Fixes: https://bugzilla.gnome.org/734762
src/photos-icons.h | 1 +
src/photos-overview-searchbar.c | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-icons.h b/src/photos-icons.h
index 50e7f21..15d33cd 100644
--- a/src/photos-icons.h
+++ b/src/photos-icons.h
@@ -30,6 +30,7 @@ G_BEGIN_DECLS
#define PHOTOS_ICON_FAVORITE "starred"
#define PHOTOS_ICON_FAVORITE_SYMBOLIC PHOTOS_ICON_FAVORITE "-symbolic"
+#define PHOTOS_ICON_GO_DOWN_SYMBOLIC "go-down-symbolic"
#define PHOTOS_ICON_GO_NEXT_SYMBOLIC "go-next-symbolic"
#define PHOTOS_ICON_GO_PREVIOUS_SYMBOLIC "go-previous-symbolic"
diff --git a/src/photos-overview-searchbar.c b/src/photos-overview-searchbar.c
index 579cc4e..61b3dc1 100644
--- a/src/photos-overview-searchbar.c
+++ b/src/photos-overview-searchbar.c
@@ -30,6 +30,7 @@
#include "photos-base-manager.h"
#include "photos-filterable.h"
+#include "photos-icons.h"
#include "photos-overview-searchbar.h"
#include "photos-search-context.h"
#include "photos-search-controller.h"
@@ -222,7 +223,7 @@ photos_overview_searchbar_create_search_widgets (PhotosSearchbar *searchbar)
PhotosOverviewSearchbar *self = PHOTOS_OVERVIEW_SEARCHBAR (searchbar);
PhotosOverviewSearchbarPrivate *priv = self->priv;
GtkStyleContext *context;
- GtkWidget *arrow;
+ GtkWidget *image;
priv->search_entry = gd_tagged_entry_new ();
gtk_widget_set_size_request (GTK_WIDGET (priv->search_entry), 500, -1);
@@ -246,12 +247,11 @@ photos_overview_searchbar_create_search_widgets (PhotosSearchbar *searchbar)
self,
G_CONNECT_SWAPPED);
+ image = gtk_image_new_from_icon_name (PHOTOS_ICON_GO_DOWN_SYMBOLIC, GTK_ICON_SIZE_BUTTON);
priv->dropdown_button = gtk_toggle_button_new ();
- arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT);
- gtk_container_add (GTK_CONTAINER (priv->dropdown_button), arrow);
+ gtk_button_set_image (GTK_BUTTON (priv->dropdown_button), image);
context = gtk_widget_get_style_context (priv->dropdown_button);
gtk_style_context_add_class (context, "raised");
- gtk_style_context_add_class (context, "image-button");
g_signal_connect_swapped (priv->dropdown_button, "toggled", G_CALLBACK
(photos_overview_searchbar_toggled), self);
g_signal_connect_swapped (priv->dropdown,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]