[gnome-photos] Use the new support for RTL icons in GTK+
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] Use the new support for RTL icons in GTK+
- Date: Wed, 28 May 2014 09:26:19 +0000 (UTC)
commit 74eef3db243f8545f8230b40cf34f97fe4f81921
Author: Debarshi Ray <debarshir gnome org>
Date: Tue May 27 15:47:12 2014 +0200
Use the new support for RTL icons in GTK+
Bump minimum GTK+ version to 3.13.2.
https://bugzilla.gnome.org/730822
configure.ac | 2 +-
src/photos-main-toolbar.c | 7 +------
src/photos-preview-nav-buttons.c | 11 ++---------
3 files changed, 4 insertions(+), 16 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9439dfe..1aca6ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ GFBGRAPH_MIN_VERSION=0.2.1
GLIB_MIN_VERSION=2.39.3
GOA_MIN_VERSION=3.8.0
GRILO_MIN_VERSION=0.2.6
-GTK_MIN_VERSION=3.11.5
+GTK_MIN_VERSION=3.13.2
LIBEXIF_MIN_VERSION=0.6.14
LIBRSVG_MIN_VERSION=2.26.0
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index f602558..a19e70c 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -145,16 +145,11 @@ static GtkWidget *
photos_main_toolbar_add_back_button (PhotosMainToolbar *self)
{
PhotosMainToolbarPrivate *priv = self->priv;
- GtkTextDirection direction;
GtkWidget *back_button;
- const gchar *icon_name;
-
- direction = gtk_widget_get_direction (GTK_WIDGET (priv->toolbar));
- icon_name = (direction == GTK_TEXT_DIR_RTL) ? PHOTOS_ICON_GO_NEXT_SYMBOLIC :
PHOTOS_ICON_GO_PREVIOUS_SYMBOLIC;
back_button = gd_header_simple_button_new ();
gd_header_button_set_label (GD_HEADER_BUTTON (back_button), _("Back"));
- gd_header_button_set_symbolic_icon_name (GD_HEADER_BUTTON (back_button), icon_name);
+ gd_header_button_set_symbolic_icon_name (GD_HEADER_BUTTON (back_button), PHOTOS_ICON_GO_PREVIOUS_SYMBOLIC);
gtk_header_bar_pack_start (GTK_HEADER_BAR (priv->toolbar), back_button);
return back_button;
diff --git a/src/photos-preview-nav-buttons.c b/src/photos-preview-nav-buttons.c
index f0c4e8c..711d16a 100644
--- a/src/photos-preview-nav-buttons.c
+++ b/src/photos-preview-nav-buttons.c
@@ -357,16 +357,9 @@ photos_preview_nav_buttons_constructed (GObject *object)
GtkWidget *button;
GtkWidget *image;
GtkWidget *toolbar;
- gboolean is_rtl;
- const gchar *next_icon_name;
- const gchar *prev_icon_name;
G_OBJECT_CLASS (photos_preview_nav_buttons_parent_class)->constructed (object);
- is_rtl = (gtk_widget_get_direction (priv->preview_view) == GTK_TEXT_DIR_RTL);
- prev_icon_name = is_rtl ? PHOTOS_ICON_GO_NEXT_SYMBOLIC : PHOTOS_ICON_GO_PREVIOUS_SYMBOLIC;
- next_icon_name = is_rtl ? PHOTOS_ICON_GO_PREVIOUS_SYMBOLIC : PHOTOS_ICON_GO_NEXT_SYMBOLIC;
-
priv->prev_widget = gtk_revealer_new ();
gtk_widget_set_halign (priv->prev_widget, GTK_ALIGN_START);
gtk_widget_set_margin_start (priv->prev_widget, 30);
@@ -375,7 +368,7 @@ photos_preview_nav_buttons_constructed (GObject *object)
gtk_revealer_set_transition_type (GTK_REVEALER (priv->prev_widget),
GTK_REVEALER_TRANSITION_TYPE_CROSSFADE);
gtk_overlay_add_overlay (GTK_OVERLAY (priv->overlay), priv->prev_widget);
- image = gtk_image_new_from_icon_name (prev_icon_name, GTK_ICON_SIZE_INVALID);
+ image = gtk_image_new_from_icon_name (PHOTOS_ICON_GO_PREVIOUS_SYMBOLIC, GTK_ICON_SIZE_INVALID);
gtk_image_set_pixel_size (GTK_IMAGE (image), 16);
button = gtk_button_new ();
@@ -404,7 +397,7 @@ photos_preview_nav_buttons_constructed (GObject *object)
gtk_revealer_set_transition_type (GTK_REVEALER (priv->next_widget),
GTK_REVEALER_TRANSITION_TYPE_CROSSFADE);
gtk_overlay_add_overlay (GTK_OVERLAY (priv->overlay), priv->next_widget);
- image = gtk_image_new_from_icon_name (next_icon_name, GTK_ICON_SIZE_INVALID);
+ image = gtk_image_new_from_icon_name (PHOTOS_ICON_GO_NEXT_SYMBOLIC, GTK_ICON_SIZE_INVALID);
gtk_image_set_pixel_size (GTK_IMAGE (image), 16);
button = gtk_button_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]