[gnome-music/wip/mschraal/gtk4: 134/141] songsview: Fix event controller
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4: 134/141] songsview: Fix event controller
- Date: Mon, 17 Feb 2020 19:37:34 +0000 (UTC)
commit 736a9f350ab640cf936f3045021414c208af9db3
Author: Marinus Schraal <mschraal gnome org>
Date: Wed Nov 6 23:38:42 2019 +0100
songsview: Fix event controller
gnomemusic/views/songsview.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/views/songsview.py b/gnomemusic/views/songsview.py
index ff8cd3db..80e20740 100644
--- a/gnomemusic/views/songsview.py
+++ b/gnomemusic/views/songsview.py
@@ -71,9 +71,10 @@ class SongsView(BaseView):
self._view.props.model = self._coremodel.props.songs_gtkliststore
self._view.props.activate_on_single_click = True
- self._ctrl = Gtk.GestureClick().new()
- self._ctrl.props.propagation_phase = Gtk.PropagationPhase.CAPTURE
- self._ctrl.connect("released", self._on_view_clicked)
+ ctrl = Gtk.GestureClick().new()
+ ctrl.connect("released", self._on_view_clicked)
+ ctrl.props.propagation_phase = Gtk.PropagationPhase.CAPTURE
+ self.add_controller(ctrl)
self._view.get_selection().props.mode = Gtk.SelectionMode.SINGLE
self._view.connect('row-activated', self._on_item_activated)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]