[gnome-music/wip/mschraal/search-cleanups: 14/17] searchview: Cleanup unused function.



commit 8cd94c30600f551b8034c8344bc6d626680e65bd
Author: Marinus Schraal <mschraal gnome org>
Date:   Fri Jul 19 15:58:52 2019 +0200

    searchview: Cleanup unused function.
    
    The search widgets themselves enter selection mode as needed.

 gnomemusic/views/searchview.py | 21 ---------------------
 1 file changed, 21 deletions(-)
---
diff --git a/gnomemusic/views/searchview.py b/gnomemusic/views/searchview.py
index cfe196c0..776642d1 100644
--- a/gnomemusic/views/searchview.py
+++ b/gnomemusic/views/searchview.py
@@ -96,10 +96,6 @@ class SearchView(BaseView):
         self._all_results_box.pack_start(self._artist_listbox, True, True, 0)
         self._all_results_box.pack_start(self._songs_listbox, True, True, 0)
 
-        # self._ctrl = Gtk.GestureMultiPress().new(self._view)
-        # self._ctrl.props.propagation_phase = Gtk.PropagationPhase.CAPTURE
-        # self._ctrl.connect("released", self._on_view_clicked)
-
         view_container.add(self._all_results_box)
 
         self._box.show_all()
@@ -259,23 +255,6 @@ class SearchView(BaseView):
         self.props.search_mode_active = True
         self._headerbar.props.state = HeaderBar.State.MAIN
 
-    @log
-    def _on_view_clicked(self, gesture, n_press, x, y):
-        """Ctrl+click on self._view triggers selection mode."""
-        _, state = Gtk.get_current_event_state()
-        modifiers = Gtk.accelerator_get_default_mod_mask()
-        if (state & modifiers == Gdk.ModifierType.CONTROL_MASK
-                and not self.props.selection_mode):
-            self.props.selection_mode = True
-
-        if self.props.selection_mode:
-            path, col, cell_x, cell_y = self._view.get_path_at_pos(x, y)
-            iter_ = self.model.get_iter(path)
-            self.model[iter_][6] = not self.model[iter_][6]
-            selected_iters = self._get_selected_iters()
-
-            self.props.selected_items_count = len(selected_iters)
-
     @log
     def _on_selection_mode_changed(self, widget, data=None):
         super()._on_selection_mode_changed(widget, data)


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