[gnome-music/wip/mschraal/gtk4: 137/143] playlistview: Fix event controller
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4: 137/143] playlistview: Fix event controller
- Date: Sun, 19 Jan 2020 10:55:52 +0000 (UTC)
commit 9173352690c44b445d0a8a78d8a206e3ec4eaebc
Author: Marinus Schraal <mschraal gnome org>
Date: Thu Nov 7 00:07:20 2019 +0100
playlistview: Fix event controller
gnomemusic/views/playlistsview.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/views/playlistsview.py b/gnomemusic/views/playlistsview.py
index 53b297b9..5d880ca5 100644
--- a/gnomemusic/views/playlistsview.py
+++ b/gnomemusic/views/playlistsview.py
@@ -111,10 +111,10 @@ class PlaylistsView(BaseView):
# self._view.props.margin_right = 80
self._view.props.valign = Gtk.Align.START
- self._controller = Gtk.GestureClick().new()
- self._controller.props.propagation_phase = Gtk.PropagationPhase.CAPTURE
- self._controller.props.button = Gdk.BUTTON_SECONDARY
- self._controller.connect("pressed", self._on_view_right_clicked)
+ ctrl = Gtk.GestureClick()
+ ctrl.props.button = Gdk.BUTTON_SECONDARY
+ ctrl.connect("pressed", self._on_view_right_clicked)
+ self.add_controller(ctrl)
view_container.add(self._view)
@@ -148,6 +148,7 @@ class PlaylistsView(BaseView):
@log
def _on_view_right_clicked(self, gesture, n_press, x, y):
+ # FIXME: Popover not working.
requested_row = self._view.get_row_at_y(y)
self._view.select_row(requested_row)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]