[nautilus] toolbar: Set button arrow icons according to locale's text direction
- From: Yosef Or Boczko <yoseforb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] toolbar: Set button arrow icons according to locale's text direction
- Date: Mon, 29 Jul 2013 15:42:01 +0000 (UTC)
commit e55e42b1acfd4046a52ecd8efe049ed519458d70
Author: Yosef Or Boczko <yoseforb gmail com>
Date: Mon Jul 29 18:41:28 2013 +0300
toolbar: Set button arrow icons according to locale's text direction
https://bugzilla.gnome.org/show_bug.cgi?id=705072
src/nautilus-toolbar.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index 15575fd..9ef565b 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -408,9 +408,12 @@ nautilus_toolbar_constructed (GObject *obj)
GtkToolItem *back_forward;
GtkToolItem *tool_item;
GtkUIManager *ui_manager;
+ gboolean rtl;
G_OBJECT_CLASS (nautilus_toolbar_parent_class)->constructed (obj);
+ rtl = gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL;
+
ui_manager = nautilus_window_get_ui_manager (self->priv->window);
gtk_style_context_set_junction_sides (gtk_widget_get_style_context (GTK_WIDGET (self)),
@@ -433,11 +436,15 @@ nautilus_toolbar_constructed (GObject *obj)
/* Back */
tool_button = toolbar_create_toolbutton (self, FALSE, FALSE, NAUTILUS_ACTION_BACK, NULL);
+ gtk_action_set_icon_name (gtk_activatable_get_related_action (tool_button),
+ rtl ? "go-previous-rtl-symbolic" : "go-previous-symbolic");
navigation_button_setup_menu (self, tool_button, NAUTILUS_NAVIGATION_DIRECTION_BACK);
gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (tool_button));
/* Forward */
tool_button = toolbar_create_toolbutton (self, FALSE, FALSE, NAUTILUS_ACTION_FORWARD, NULL);
+ gtk_action_set_icon_name (gtk_activatable_get_related_action (tool_button),
+ rtl ? "go-next-rtl-symbolic" : "go-next-symbolic");
navigation_button_setup_menu (self, tool_button, NAUTILUS_NAVIGATION_DIRECTION_FORWARD);
gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (tool_button));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]