[gnome-music: 1/2] Adding RTL variants to repeat/shuffle icons (Bug 706576)



commit 5fb47df6c61bec81adb247c8155eda9e26f749c8
Author: Shivani Poddar <shivani poddar92 gmail com>
Date:   Thu Sep 5 22:29:42 2013 +0530

    Adding RTL variants to repeat/shuffle icons (Bug 706576)

 gnomemusic/player.py |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 4d6db37..490ac2e 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -513,13 +513,25 @@ class Player(GObject.GObject):
     def _sync_repeat_image(self):
         icon = None
         if self.repeat == RepeatType.NONE:
-            icon = 'media-playlist-consecutive-symbolic'
+            if Gtk.Widget.get_default_direction() is not Gtk.TextDirection.RTL:
+                icon = 'media-playlist-consecutive-symbolic'
+            else:
+                icon = 'media-playlist-consecutive-rtl-symbolic'
         elif self.repeat == RepeatType.SHUFFLE:
-            icon = 'media-playlist-shuffle-symbolic'
+            if Gtk.Widget.get_default_direction() is not Gtk.TextDirection.RTL:
+                icon = 'media-playlist-shuffle-symbolic'
+            else:
+                icon = 'media-playlist-shuffle-rtl-symbolic'
         elif self.repeat == RepeatType.ALL:
-            icon = 'media-playlist-repeat-symbolic'
+            if Gtk.Widget.get_default_direction() is not Gtk.TextDirection.RTL:
+                icon = 'media-playlist-repeat-symbolic'
+            else:
+                icon = 'media-playlist-repeat-rtl-symbolic'
         elif self.repeat == RepeatType.SONG:
-            icon = 'media-playlist-repeat-song-symbolic'
+            if Gtk.Widget.get_default_direction() is not Gtk.TextDirection.RTL:
+                icon = 'media-playlist-repeat-song-symbolic'
+            else:
+                icon = 'media-playlist-repeat-song-rtl-symbolic'
 
         self.repeatBtnImage.set_from_icon_name(icon, Gtk.IconSize.MENU)
         self.emit('repeat-mode-changed')


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