[gnome-music/wip/mschraal/gtk4: 4/10] songsview: Fix event controller
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4: 4/10] songsview: Fix event controller
- Date: Tue, 18 Feb 2020 11:44:06 +0000 (UTC)
commit b565ab8e37d718ab2a307b5690df6da94aa047fb
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]