[gnome-music/wip/jfelder/core-restore-player-validation: 2/7] playlistsview: Disable global selection mode event



commit 3e58119f6acd5e7a873fbca4a36d7ce6db816ec8
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 af5dd5f8..8ba58508 100644
--- a/gnomemusic/views/baseview.py
+++ b/gnomemusic/views/baseview.py
@@ -91,7 +91,8 @@ class BaseView(Gtk.Stack):
 
         self._init = False
         grilo.connect('ready', self._on_grilo_ready)
-        self.connect('notify::selection-mode', self._on_selection_mode_changed)
+        self._selection_mode_id = self.connect(
+            "notify::selection-mode", self._on_selection_mode_changed)
         grilo.connect('changes-pending', self._on_changes_pending)
 
         self.bind_property(
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]