[gnome-music/wip/mschraal/gtk4] playlistswidget: Disable ctrlr



commit 4569c73218f0a2e01e994b1baa633f5623a8a5ae
Author: Marinus Schraal <mschraal gnome org>
Date:   Wed Apr 29 01:48:18 2020 +0200

    playlistswidget: Disable ctrlr

 data/ui/PlaylistsWidget.ui            |  2 ++
 gnomemusic/widgets/playlistswidget.py | 26 +++++++++++++-------------
 2 files changed, 15 insertions(+), 13 deletions(-)
---
diff --git a/data/ui/PlaylistsWidget.ui b/data/ui/PlaylistsWidget.ui
index 3d518291..66891336 100644
--- a/data/ui/PlaylistsWidget.ui
+++ b/data/ui/PlaylistsWidget.ui
@@ -30,10 +30,12 @@
       </object>
     </child>
   </template>
+<!--
   <object class="GtkGestureMultiPress" id="_songs_list_ctrlr">
     <property name="widget">_songs_list</property>
     <property name="propagation-phase">capture</property>
     <property name="button">3</property>
     <signal name="pressed" handler="_songs_list_right_click" swapped="no"/>
   </object>
+-->
 </interface>
diff --git a/gnomemusic/widgets/playlistswidget.py b/gnomemusic/widgets/playlistswidget.py
index 084b42e7..f8cd38cd 100644
--- a/gnomemusic/widgets/playlistswidget.py
+++ b/gnomemusic/widgets/playlistswidget.py
@@ -40,7 +40,7 @@ class PlaylistsWidget(Gtk.Box):
 
     _pl_ctrls = Gtk.Template.Child()
     _songs_list = Gtk.Template.Child()
-    _songs_list_ctrlr = Gtk.Template.Child()
+    # _songs_list_ctrlr = Gtk.Template.Child()
 
     def __init__(self, application, playlists_view):
         """Initialize the PlaylistsWidget.
@@ -133,20 +133,20 @@ class PlaylistsWidget(Gtk.Box):
                 and current_playlist.props.is_smart):
             current_playlist.update()
 
-    @Gtk.Template.Callback()
-    def _songs_list_right_click(self, gesture, n_press, x, y):
-        requested_row = self._songs_list.get_row_at_y(y)
-        self._songs_list.select_row(requested_row)
+    # @Gtk.Template.Callback()
+    # def _songs_list_right_click(self, gesture, n_press, x, y):
+    #     requested_row = self._songs_list.get_row_at_y(y)
+    #     self._songs_list.select_row(requested_row)
 
-        _, y0 = requested_row.translate_coordinates(self._songs_list, 0, 0)
-        row_height = requested_row.get_allocated_height()
-        rect = Gdk.Rectangle()
-        rect.x = x
-        rect.y = y0 + 0.5 * row_height
+    #     _, y0 = requested_row.translate_coordinates(self._songs_list, 0, 0)
+    #     row_height = requested_row.get_allocated_height()
+    #     rect = Gdk.Rectangle()
+    #     rect.x = x
+    #     rect.y = y0 + 0.5 * row_height
 
-        self._song_popover.props.relative_to = self._songs_list
-        self._song_popover.props.pointing_to = rect
-        self._song_popover.popup()
+    #     self._song_popover.props.relative_to = self._songs_list
+    #     self._song_popover.props.pointing_to = rect
+    #     self._song_popover.popup()
 
     def _play_song(self, menuitem, data=None):
         selected_row = self._songs_list.get_selected_row()


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