user-accounts: fix the look of the arrows in the history dialog

https://bugzilla.gnome.org/show_bug.cgi?id=704186
This commit is contained in:
Yosef Or Boczko 2013-07-17 19:28:16 +03:00
parent 35e3697b1d
commit 55b212075f
2 changed files with 25 additions and 20 deletions

View file

@ -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>

View file

@ -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;
}