[gnome-photos] main-toolbar: Reverse the back icon when using an RTL layout
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] main-toolbar: Reverse the back icon when using an RTL layout
- Date: Sun, 15 Jul 2012 20:14:58 +0000 (UTC)
commit c4f656ea62270309a619e2b6713622ca1aabf2a6
Author: Debarshi Ray <debarshir gnome org>
Date: Sun Jul 15 00:07:42 2012 +0200
main-toolbar: Reverse the back icon when using an RTL layout
Original patch from Cosimo Cecchi for gnome-documents.
src/photos-main-toolbar.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index f3f2c42..4faa57c 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -276,12 +276,13 @@ static void
photos_main_toolbar_populate_for_preview (PhotosMainToolbar *self)
{
PhotosMainToolbarPrivate *priv = self->priv;
+ GtkTextDirection direction;
GtkWidget *back_button;
+ const gchar *icon_name;
- back_button = gd_main_toolbar_add_button (GD_MAIN_TOOLBAR (priv->widget),
- "go-previous-symbolic",
- _("Back"),
- TRUE);
+ direction = gtk_widget_get_direction (GTK_WIDGET (priv->widget));
+ icon_name = (direction == GTK_TEXT_DIR_RTL) ? "go-next-symbolic" : "go-previous-symbolic";
+ back_button = gd_main_toolbar_add_button (GD_MAIN_TOOLBAR (priv->widget), icon_name, _("Back"), TRUE);
g_signal_connect (back_button, "clicked", G_CALLBACK (photos_main_toolbar_back_button_clicked), self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]