[gnome-music/wip/mschraal/gtk4: 116/143] albumcover: Cleanup and break



commit 7fdb5bb2f6786866599a227559ef5ef057d35172
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Oct 31 16:05:57 2019 +0100

    albumcover: Cleanup and break

 data/ui/AlbumCover.ui            |  4 +++-
 gnomemusic/widgets/albumcover.py | 22 +++++++++++-----------
 2 files changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/data/ui/AlbumCover.ui b/data/ui/AlbumCover.ui
index 46d21b3c..eaabd899 100644
--- a/data/ui/AlbumCover.ui
+++ b/data/ui/AlbumCover.ui
@@ -16,10 +16,12 @@
             <property name="can_focus">False</property>
             <property name="margin_bottom">4</property>
             <child>
-              <object class="GtkEventBox" id="_events">
+              <object class="GtkBox" id="_events">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+<!--
                 <signal name="button-release-event" handler="_on_album_event" swapped="no"/>
+-->
                 <child>
                   <object class="CoverStack" id="_cover_stack">
                     <property name="visible">True</property>
diff --git a/gnomemusic/widgets/albumcover.py b/gnomemusic/widgets/albumcover.py
index 7b9cfaa7..498240e9 100644
--- a/gnomemusic/widgets/albumcover.py
+++ b/gnomemusic/widgets/albumcover.py
@@ -91,7 +91,7 @@ class AlbumCover(Gtk.FlowBoxChild):
 
         self.connect('query-tooltip', self._on_tooltip_query)
 
-        self._events.add_events(Gdk.EventMask.TOUCH_MASK)
+        # self._events.add_events(Gdk.EventMask.TOUCH_MASK)
 
         self._cover_stack.props.size = Art.Size.MEDIUM
 
@@ -121,16 +121,16 @@ class AlbumCover(Gtk.FlowBoxChild):
         """
         return self._corealbum
 
-    @Gtk.Template.Callback()
-    @log
-    def _on_album_event(self, evbox, event, data=None):
-        modifiers = Gtk.accelerator_get_default_mod_mask()
-        if ((event.get_state() & modifiers) == Gdk.ModifierType.CONTROL_MASK
-                and not self.props.selection_mode):
-            self.props.selection_mode = True
-
-        if self.props.selection_mode:
-            self.props.selected = not self.props.selected
+    # @Gtk.Template.Callback()
+    # @log
+    # def _on_album_event(self, evbox, event, data=None):
+    #     modifiers = Gtk.accelerator_get_default_mod_mask()
+    #     if ((event.get_state() & modifiers) == Gdk.ModifierType.CONTROL_MASK
+    #             and not self.props.selection_mode):
+    #         self.props.selection_mode = True
+
+    #     if self.props.selection_mode:
+    #         self.props.selected = not self.props.selected
 
     @Gtk.Template.Callback()
     @log


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