[gthumb] headerbar: set the button arrow icons according to the locale's text direction
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] headerbar: set the button arrow icons according to the locale's text direction
- Date: Sat, 9 Nov 2013 20:43:18 +0000 (UTC)
commit 8d000a0b737bec1893c27bee680d4eff0905d78f
Author: Yosef Or Boczko <yoseforb gmail com>
Date: Sat Nov 9 22:32:26 2013 +0200
headerbar: set the button arrow icons according to the locale's text direction
https://bugzilla.gnome.org/show_bug.cgi?id=711741
gthumb/gth-browser.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index d10ac54..24b8ab1 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -4018,9 +4018,12 @@ gth_browser_init (GthBrowser *browser)
{
GtkWidget *header_bar;
+ gboolean rtl;
header_bar = gth_window_get_header_bar (GTH_WINDOW (browser));
+ rtl = gtk_widget_get_direction (header_bar) == GTK_TEXT_DIR_RTL;
+
gtk_widget_set_margin_left
(browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_BROWSER_COMMANDS], SECTION_BIG_MARGIN);
gtk_widget_set_margin_right
(browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_BROWSER_VIEW], SECTION_BIG_MARGIN);
gtk_widget_set_margin_left
(browser->priv->header_sections[GTH_BROWSER_HEADER_SECTION_VIEWER_EDIT], SECTION_BIG_MARGIN);
@@ -4068,13 +4071,13 @@ gth_browser_init (GthBrowser *browser)
gth_browser_add_header_bar_button (browser,
GTH_BROWSER_HEADER_SECTION_BROWSER_NAVIGATION,
- "go-previous-symbolic",
+ rtl ? "go-previous-rtl-symbolic" : "go-previous-symbolic",
_("Go to the previous visited location"),
"win.go-back",
NULL);
gth_browser_add_header_bar_button (browser,
GTH_BROWSER_HEADER_SECTION_BROWSER_NAVIGATION,
- "go-next-symbolic",
+ rtl ? "go-next-rtl-symbolic" : "go-next-symbolic",
_("Go to the next visited location"),
"win.go-forward",
NULL);
@@ -4102,7 +4105,7 @@ gth_browser_init (GthBrowser *browser)
gth_browser_add_header_bar_button (browser,
GTH_BROWSER_HEADER_SECTION_VIEWER_NAVIGATION,
- "go-previous-symbolic",
+ rtl ? "go-previous-rtl-symbolic" : "go-previous-symbolic",
_("View the folders"),
"win.browser-mode",
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]