[gnome-control-center] shell: Fix alignment of home button in RTL languages



commit 1e2f8202ae659d91ddc69080e6d1dee0652e0f83
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Dec 6 09:30:44 2012 +0100

    shell: Fix alignment of home button in RTL languages
    
    https://bugzilla.gnome.org/show_bug.cgi?id=689533

 shell/gnome-control-center.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index 00a5b5b..6f9ad3b 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -1333,6 +1333,7 @@ gnome_control_center_init (GnomeControlCenter *self)
   GError *err = NULL;
   GnomeControlCenterPrivate *priv;
   GdkScreen *screen;
+  GtkWidget *frame;
 
   priv = self->priv = CONTROL_CENTER_PRIVATE (self);
 
@@ -1379,6 +1380,11 @@ gnome_control_center_init (GnomeControlCenter *self)
   g_signal_connect (priv->notebook, "notify::page",
                     G_CALLBACK (notebook_page_notify_cb), priv);
 
+  /* Set the alignment for the home button */
+  frame = W(priv->builder, "home-aspect-frame");
+  if (gtk_widget_get_direction (frame) == GTK_TEXT_DIR_RTL)
+    g_object_set (frame, "xalign", 1.0, NULL);
+
   g_signal_connect (gtk_builder_get_object (priv->builder, "home-button"),
                     "clicked", G_CALLBACK (home_button_clicked_cb), self);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]