[gnome-control-center] user-accounts: fix the look of the arrows in the history dialog



commit 55b212075fd7f1b6801592a5e65e3d8fbf332f01
Author: Yosef Or Boczko <yoseforb gmail com>
Date:   Wed Jul 17 19:28:16 2013 +0300

    user-accounts: fix the look of the arrows in the history dialog
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704186

 panels/user-accounts/data/history-dialog.ui |   32 ++++++++++----------------
 panels/user-accounts/um-history-dialog.c    |   13 +++++++++++
 2 files changed, 25 insertions(+), 20 deletions(-)
---
diff --git a/panels/user-accounts/data/history-dialog.ui b/panels/user-accounts/data/history-dialog.ui
index 95ef411..fb4751e 100644
--- a/panels/user-accounts/data/history-dialog.ui
+++ b/panels/user-accounts/data/history-dialog.ui
@@ -56,22 +56,20 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="previous-button-atkobject">
-                        <property name="accessible-name" translatable="yes">Previous Week</property>
-                      </object>
-                    </child>
+                    <property name="valign">center</property>
+                    <style>
+                      <class name="image-button"/>
+                    </style>
                     <child>
-                      <object class="GtkArrow" id="arrow1">
+                      <object class="GtkImage" id="previous-image">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="arrow_type">left</property>
                       </object>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="fill">True</property>
+                    <property name="fill">False</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -94,26 +92,20 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="next-button-atkobject">
-                        <property name="accessible-name" translatable="yes">Next Week</property>
-                      </object>
-                    </child>
+                    <style>
+                      <class name="image-button"/>
+                    </style>
                     <child>
-                      <object class="GtkArrow" id="arrow2">
+                      <object class="GtkImage" id="next-image">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="arrow2-atkobject">
-                            <property name="accessible-name" translatable="yes">Next week</property>
-                          </object>
-                        </child>
+                        <property name="valign">center</property>
                       </object>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="fill">True</property>
+                    <property name="fill">False</property>
                     <property name="position">2</property>
                   </packing>
                 </child>
diff --git a/panels/user-accounts/um-history-dialog.c b/panels/user-accounts/um-history-dialog.c
index 3d062b4..3f4cc19 100644
--- a/panels/user-accounts/um-history-dialog.c
+++ b/panels/user-accounts/um-history-dialog.c
@@ -329,10 +329,13 @@ um_history_dialog_new (void)
         GError *error = NULL;
         UmHistoryDialog *um;
         GtkWidget *widget;
+        gboolean rtl;
 
         um = g_new0 (UmHistoryDialog, 1);
         um->builder = gtk_builder_new ();
 
+        rtl = gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL;
+
         if (!gtk_builder_add_from_resource (um->builder, 
"/org/gnome/control-center/user-accounts/history-dialog.ui", &error)) {
                 g_error ("%s", error->message);
                 g_error_free (error);
@@ -353,6 +356,16 @@ um_history_dialog_new (void)
         widget = get_widget (um, "previous-button");
         g_signal_connect (widget, "clicked", G_CALLBACK (show_previous), um);
 
+        widget = get_widget (um, "next-image");
+        gtk_image_set_from_icon_name (GTK_IMAGE (widget),
+                                      rtl ? "go-next-rtl-symbolic" : "go-next-symbolic",
+                                      GTK_ICON_SIZE_MENU);
+
+        widget = get_widget (um, "previous-image");
+        gtk_image_set_from_icon_name (GTK_IMAGE (widget),
+                                      rtl ? "go-previous-rtl-symbolic" : "go-previous-symbolic",
+                                      GTK_ICON_SIZE_MENU);
+
         return um;
 }
 


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