diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2012-12-15 04:26:58 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2012-12-15 18:25:11 +0800 |
commit | c83458d2b065ba4056163dff6db1bc0779e0b8fd (patch) | |
tree | cade95e849c918eeca00fb59c44b0d8da4c90c76 /src/ephy-window.c | |
parent | 9dc80533f94749c0e765e4508e2fb8cb9c6cb5b1 (diff) | |
download | gsoc2013-epiphany-c83458d2b065ba4056163dff6db1bc0779e0b8fd.tar gsoc2013-epiphany-c83458d2b065ba4056163dff6db1bc0779e0b8fd.tar.gz gsoc2013-epiphany-c83458d2b065ba4056163dff6db1bc0779e0b8fd.tar.bz2 gsoc2013-epiphany-c83458d2b065ba4056163dff6db1bc0779e0b8fd.tar.lz gsoc2013-epiphany-c83458d2b065ba4056163dff6db1bc0779e0b8fd.tar.xz gsoc2013-epiphany-c83458d2b065ba4056163dff6db1bc0779e0b8fd.tar.zst gsoc2013-epiphany-c83458d2b065ba4056163dff6db1bc0779e0b8fd.zip |
ephy-toolbar: fix the toolbar in RTL environments
https://bugzilla.gnome.org/show_bug.cgi?id=684366
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r-- | src/ephy-window.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 0649701ac..37bc34b2d 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1297,6 +1297,7 @@ setup_ui_manager (EphyWindow *window) GtkActionGroup *action_group; GtkAction *action; GtkUIManager *manager; + const char *prev_icon, *next_icon; window->priv->main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_widget_show (window->priv->main_vbox); @@ -1356,12 +1357,20 @@ setup_ui_manager (EphyWindow *window) window->priv->tab_accels_action_group = action_group; g_object_unref (action_group); + if (gtk_widget_get_direction (GTK_WIDGET (window)) == GTK_TEXT_DIR_RTL) { + prev_icon = "go-previous-rtl-symbolic"; + next_icon = "go-next-rtl-symbolic"; + } else { + prev_icon = "go-previous-symbolic"; + next_icon = "go-next-symbolic"; + } + action_group = gtk_action_group_new ("SpecialToolbarActions"); action = g_object_new (EPHY_TYPE_NAVIGATION_HISTORY_ACTION, "name", "NavigationBack", "label", _("Back"), - "icon-name", "go-previous-symbolic", + "icon-name", prev_icon, "window", window, "direction", EPHY_NAVIGATION_HISTORY_DIRECTION_BACK, NULL); @@ -1373,7 +1382,7 @@ setup_ui_manager (EphyWindow *window) g_object_new (EPHY_TYPE_NAVIGATION_HISTORY_ACTION, "name", "NavigationForward", "label", _("Forward"), - "icon-name", "go-next-symbolic", + "icon-name", next_icon, "window", window, "direction", EPHY_NAVIGATION_HISTORY_DIRECTION_FORWARD, NULL); |