[gnome-music] widgets: don't start playback if we clicked on star in album widget



commit 567acb79872454b6fd52256ab80deaf78f16b09c
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Tue Feb 10 13:07:38 2015 +0100

    widgets: don't start playback if we clicked on star in album widget

 gnomemusic/widgets.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index f3765f4..6c58502 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -90,7 +90,7 @@ class AlbumWidget(Gtk.EventBox):
         view_box.add(child_view)
         self.add(self.ui.get_object('AlbumWidget'))
         self._add_list_renderers()
-        # TODO: make this work
+        self.star_renderer_click = False
         self.get_style_context().add_class('view')
         self.get_style_context().add_class('content-view')
         self.show_all()
@@ -101,6 +101,10 @@ class AlbumWidget(Gtk.EventBox):
 
     @log
     def _on_item_activated(self, widget, id, path):
+        if self.star_renderer_click:
+            self.star_renderer_click = False
+            return
+
         _iter = self.model.get_iter(path)
 
         if(self.model.get_value(_iter, 7) != ERROR_ICON_NAME):


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