[gnome-music/wip/mschraal/core] playlistsview: Disable global selection mode event



commit d6e51b4ba4625336d667d3c0dd30dadc79820c81
Author: Jean Felder <jfelder src gnome org>
Date:   Sun Jul 14 22:03:38 2019 +0200

    playlistsview: Disable global selection mode event
    
    Indeed, selection is only possible from the context menu.

 gnomemusic/views/baseview.py      | 3 ++-
 gnomemusic/views/playlistsview.py | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/views/baseview.py b/gnomemusic/views/baseview.py
index 96ecca55..18c5b841 100644
--- a/gnomemusic/views/baseview.py
+++ b/gnomemusic/views/baseview.py
@@ -89,7 +89,8 @@ class BaseView(Gtk.Stack):
         # self._view.hide()
 
         self._init = False
-        self.connect('notify::selection-mode', self._on_selection_mode_changed)
+        self._selection_mode_id = self.connect(
+            "notify::selection-mode", self._on_selection_mode_changed)
 
         self.bind_property(
             'selection-mode', self._window, 'selection-mode',
diff --git a/gnomemusic/views/playlistsview.py b/gnomemusic/views/playlistsview.py
index 9e2e3e20..db8efac8 100644
--- a/gnomemusic/views/playlistsview.py
+++ b/gnomemusic/views/playlistsview.py
@@ -113,6 +113,9 @@ class PlaylistsView(BaseView):
         self._loaded_id = self._coremodel.connect(
             "playlists-loaded", self._on_playlists_loaded)
 
+        # Selection is only possible from the context menu
+        self.disconnect(self._selection_mode_id)
+
         self.show_all()
 
     @log


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