[goobox] properties: Set button arrow icons according to locale's text direction
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goobox] properties: Set button arrow icons according to locale's text direction
- Date: Sun, 19 Jan 2014 15:40:43 +0000 (UTC)
commit 30c1bb9e946e7423b14b431af318a7262b6ad200
Author: Yosef Or Boczko <yoseforb gmail com>
Date: Sun Jan 19 00:10:16 2014 +0200
properties: Set button arrow icons according to locale's text direction
https://bugzilla.gnome.org/show_bug.cgi?id=722513
src/dlg-properties.c | 13 +++++++++++++
src/ui/properties.ui | 6 ++----
2 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/src/dlg-properties.c b/src/dlg-properties.c
index cc5fed1..b020900 100644
--- a/src/dlg-properties.c
+++ b/src/dlg-properties.c
@@ -484,12 +484,16 @@ void
dlg_properties (GooWindow *window)
{
DialogData *data;
+ GtkWidget *image;
+ gboolean rtl;
if (window->properties_dialog != NULL) {
gtk_window_present (GTK_WINDOW (window->properties_dialog));
return;
}
+ rtl = gtk_widget_get_direction (GTK_WIDGET (window)) == GTK_TEXT_DIR_RTL;
+
data = g_new0 (DialogData, 1);
data->window = window;
data->builder = _gtk_builder_new_from_resource ("properties.ui");
@@ -502,6 +506,15 @@ dlg_properties (GooWindow *window)
data->dialog = GET_WIDGET ("properties_dialog");
window->properties_dialog = data->dialog;
+ image = GET_WIDGET ("prev_album_image");
+ gtk_image_set_from_icon_name (GTK_IMAGE (image),
+ rtl ? "go-previous-rtl-symbolic" : "go-previous-symbolic",
+ GTK_ICON_SIZE_MENU);
+ image = GET_WIDGET ("next_album_image");
+ gtk_image_set_from_icon_name (GTK_IMAGE (image),
+ rtl ? "go-next-rtl-symbolic" : "go-next-symbolic",
+ GTK_ICON_SIZE_MENU);
+
/* Set widgets data. */
data->list_store = gtk_list_store_new (N_COLUMNS,
diff --git a/src/ui/properties.ui b/src/ui/properties.ui
index 9e18bae..6753a15 100644
--- a/src/ui/properties.ui
+++ b/src/ui/properties.ui
@@ -391,10 +391,9 @@
<property name="receives_default">False</property>
<property name="relief">none</property>
<child>
- <object class="GtkImage" id="image3">
+ <object class="GtkImage" id="prev_album_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="icon_name">go-previous-symbolic</property>
</object>
</child>
</object>
@@ -423,10 +422,9 @@
<property name="receives_default">False</property>
<property name="relief">none</property>
<child>
- <object class="GtkImage" id="image4">
+ <object class="GtkImage" id="next_album_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="icon_name">go-next-symbolic</property>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]