[gnome-music/wip/jfelder/search-selection-reset: 10/11] baseview: Remove _on_selection_mode_request method



commit 941761213dad812b0c751f4e30a354973f40d576
Author: Jean Felder <jfelder src gnome org>
Date:   Tue Feb 26 15:53:04 2019 +0100

    baseview: Remove _on_selection_mode_request method
    
    This method is no longer useful.

 gnomemusic/views/artistsview.py | 2 +-
 gnomemusic/views/baseview.py    | 4 ----
 gnomemusic/views/searchview.py  | 2 +-
 gnomemusic/views/songsview.py   | 2 +-
 4 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/gnomemusic/views/artistsview.py b/gnomemusic/views/artistsview.py
index 53a5198c..328424ff 100644
--- a/gnomemusic/views/artistsview.py
+++ b/gnomemusic/views/artistsview.py
@@ -179,7 +179,7 @@ class ArtistsView(BaseView):
         modifiers = Gtk.accelerator_get_default_mod_mask()
         if ((state & modifiers) == Gdk.ModifierType.CONTROL_MASK
                 and not self.props.selection_mode):
-            self._on_selection_mode_request()
+            self.props.selection_mode = True
 
     @log
     def _on_selection_changed(self, widget, value, data=None):
diff --git a/gnomemusic/views/baseview.py b/gnomemusic/views/baseview.py
index 91f94f3a..25ca9767 100644
--- a/gnomemusic/views/baseview.py
+++ b/gnomemusic/views/baseview.py
@@ -147,10 +147,6 @@ class BaseView(Gtk.Stack):
     def _on_item_activated(self, widget, id, path):
         pass
 
-    @log
-    def _on_selection_mode_request(self, *args):
-        self.props.selection_mode = not self.props.selection_mode
-
     @log
     def get_selected_songs(self, callback):
         callback([])
diff --git a/gnomemusic/views/searchview.py b/gnomemusic/views/searchview.py
index e0ff0c19..2c557c88 100644
--- a/gnomemusic/views/searchview.py
+++ b/gnomemusic/views/searchview.py
@@ -181,7 +181,7 @@ class SearchView(BaseView):
         modifiers = Gtk.accelerator_get_default_mod_mask()
         if (state & modifiers == Gdk.ModifierType.CONTROL_MASK
                 and not self.props.selection_mode):
-            self._on_selection_mode_request()
+            self.props.selection_mode = True
 
         if (self.selection_mode
                 and not self._star_handler.star_renderer_click):
diff --git a/gnomemusic/views/songsview.py b/gnomemusic/views/songsview.py
index 553469ad..c6e432f5 100644
--- a/gnomemusic/views/songsview.py
+++ b/gnomemusic/views/songsview.py
@@ -217,7 +217,7 @@ class SongsView(BaseView):
         modifiers = Gtk.accelerator_get_default_mod_mask()
         if (state & modifiers == Gdk.ModifierType.CONTROL_MASK
                 and not self.props.selection_mode):
-            self._on_selection_mode_request()
+            self.props.selection_mode = True
 
         # FIXME: In selection mode, star clicks might still trigger
         # activation.


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