[gnome-music/gnome-3-12] Added tooltips to player and header buttons



commit 2ad499d05f435e14bd9aeec1ae4e5effcff43dc4
Author: Michal Vanko <mklakakilli gmail com>
Date:   Mon May 5 19:51:44 2014 +0200

    Added tooltips to player and header buttons
    
    https://bugzilla.gnome.org/show_bug.cgi?id=725949

 data/PlayerToolbar.ui |    3 +++
 data/headerbar.ui.in  |    3 +++
 gnomemusic/player.py  |   10 +++++++++-
 3 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/data/PlayerToolbar.ui b/data/PlayerToolbar.ui
index 1739d5a..e4bd052 100644
--- a/data/PlayerToolbar.ui
+++ b/data/PlayerToolbar.ui
@@ -64,6 +64,7 @@
                         <property name="receives_default">True</property>
                         <property name="image">previous_image</property>
                         <property name="always_show_image">True</property>
+                        <property name="tooltip_text" translatable="yes">Previous</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -80,6 +81,7 @@
                         <property name="receives_default">True</property>
                         <property name="image">play_image</property>
                         <property name="always_show_image">True</property>
+                        <property name="tooltip_text" translatable="yes">Play</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -96,6 +98,7 @@
                         <property name="receives_default">True</property>
                         <property name="image">next_image</property>
                         <property name="always_show_image">True</property>
+                        <property name="tooltip_text" translatable="yes">Next</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
diff --git a/data/headerbar.ui.in b/data/headerbar.ui.in
index 77e0b12..efc9046 100644
--- a/data/headerbar.ui.in
+++ b/data/headerbar.ui.in
@@ -64,6 +64,7 @@
         <property name="can_focus">False</property>
         <property name="valign">center</property>
         <property name="sensitive">True</property>
+        <property name="tooltip_text" translatable="yes">Search</property>
         <style>
           <class name="image-button"/>
         </style>
@@ -86,6 +87,7 @@
         <property name="can_focus">False</property>
         <property name="valign">center</property>
         <property name="sensitive">True</property>
+        <property name="tooltip_text" translatable="yes">Select</property>
         <style>
           <class name="image-button"/>
         </style>
@@ -124,6 +126,7 @@
         <property name="can_focus">False</property>
         <property name="valign">center</property>
         <property name="sensitive">True</property>
+        <property name="tooltip_text" translatable="yes">Back</property>
         <style>
               <class name="image-button"/>
         </style>
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index eaeb5bc..d2a8c96 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -339,10 +339,18 @@ class Player(GObject.GObject):
 
     @log
     def _sync_playing(self):
-        image = self._pauseImage if self._get_playing() else self._playImage
+        if self._get_playing():
+            image = self._pauseImage
+            tooltip = _("Pause")
+        else:
+            image = self._playImage
+            tooltip = _("Play")
+
         if self.playBtn.get_image() != image:
             self.playBtn.set_image(image)
 
+        self.playBtn.set_tooltip_text(tooltip)
+
     @log
     def _sync_prev_next(self):
         hasNext = self.has_next()


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