[gnome-music/wip/jfelder/gtk4-v3: 145/145] lastfmdialog: Fix configure click controller
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/gtk4-v3: 145/145] lastfmdialog: Fix configure click controller
- Date: Thu, 3 Feb 2022 20:43:10 +0000 (UTC)
commit 3f1ad3256c71ae9aed9246bbcc87fc259f0d49c3
Author: Jean Felder <jfelder src gnome org>
Date: Thu Feb 3 21:18:02 2022 +0100
lastfmdialog: Fix configure click controller
data/ui/LastfmDialog.ui | 2 ++
gnomemusic/widgets/lastfmdialog.py | 7 +++++--
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/LastfmDialog.ui b/data/ui/LastfmDialog.ui
index f4d225c77..d65042fa6 100644
--- a/data/ui/LastfmDialog.ui
+++ b/data/ui/LastfmDialog.ui
@@ -52,6 +52,8 @@
<object class="GtkButton" id="_action_button">
<child>
<object class="GtkGestureClick">
+ <property name="button">1</property>
+ <property name="propagation-phase">capture</property>
<signal name="released" handler="_on_action_button_clicked" swapped="no"/>
</object>
</child>
diff --git a/gnomemusic/widgets/lastfmdialog.py b/gnomemusic/widgets/lastfmdialog.py
index 1cf32cf11..22c4ffe44 100644
--- a/gnomemusic/widgets/lastfmdialog.py
+++ b/gnomemusic/widgets/lastfmdialog.py
@@ -24,7 +24,7 @@
from gettext import gettext as _
-from gi.repository import Gtk
+from gi.repository import Gdk, Gtk
from gnomemusic.scrobbler import GoaLastFM
@@ -72,5 +72,8 @@ class LastfmDialog(Gtk.Dialog):
self._action_label.props.label = action
@Gtk.Template.Callback()
- def _on_action_button_clicked(self, widget, n_press, x, y):
+ def _on_action_button_clicked(
+ self, controller: Gtk.GestureClick, n_press: int, x: float,
+ y: float) -> bool:
self._lastfm_scrobbler.configure()
+ return Gdk.EVENT_STOP
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]