[goobox] window: Set button arrow icons according to locale's text direction



commit 63c990f5c37f2f5713cf654aa014cdd1bbfbeb16
Author: Yosef Or Boczko <yoseforb gmail com>
Date:   Tue Jan 14 15:58:50 2014 +0200

    window: Set button arrow icons according to locale's text direction
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722174

 src/goo-window.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/goo-window.c b/src/goo-window.c
index 9bd73a8..e69a0f1 100644
--- a/src/goo-window.c
+++ b/src/goo-window.c
@@ -1584,8 +1584,12 @@ player_done_cb (GooPlayer       *player,
                GError          *error,
                GooWindow       *window)
 {
+       gboolean rtl;
+
        debug (DEBUG_INFO, "DONE [%s]\n", get_action_name (action));
 
+       rtl = gtk_widget_get_direction (GTK_WIDGET (window)) == GTK_TEXT_DIR_RTL;
+
        switch (action) {
        case GOO_PLAYER_ACTION_LIST:
                goo_window_update_album (window);
@@ -1615,14 +1619,14 @@ player_done_cb (GooPlayer       *player,
        case GOO_PLAYER_ACTION_SEEK_SONG:
                goo_window_set_current_track (window, goo_player_get_current_track (window->priv->player));
                goo_window_select_current_track (window);
-               set_current_track_icon (window, GOO_ICON_NAME_PLAY);
+               set_current_track_icon (window, rtl ? GOO_ICON_NAME_PLAY_RTL : GOO_ICON_NAME_PLAY);
                break;
 
        case GOO_PLAYER_ACTION_PLAY:
        case GOO_PLAYER_ACTION_STOP:
        case GOO_PLAYER_ACTION_MEDIUM_REMOVED:
                if (action == GOO_PLAYER_ACTION_PLAY) {
-                       set_current_track_icon (window, GOO_ICON_NAME_PLAY);
+                       set_current_track_icon (window, rtl ? GOO_ICON_NAME_PLAY_RTL : GOO_ICON_NAME_PLAY);
                        window->priv->next_timeout_handle = g_idle_add (next_time_idle, window);
                }
                else if (action == GOO_PLAYER_ACTION_STOP)


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