[gnome-music/wip/mschraal/gtk4: 77/81] smoothscale: Fix event controller
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4: 77/81] smoothscale: Fix event controller
- Date: Wed, 26 Feb 2020 15:17:02 +0000 (UTC)
commit 33e51c15b5007b4add906da8c308a1ad1c804115
Author: Marinus Schraal <mschraal gnome org>
Date: Thu Nov 7 00:09:50 2019 +0100
smoothscale: Fix event controller
gnomemusic/widgets/smoothscale.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/widgets/smoothscale.py b/gnomemusic/widgets/smoothscale.py
index 6f0b46b2..bd266e56 100644
--- a/gnomemusic/widgets/smoothscale.py
+++ b/gnomemusic/widgets/smoothscale.py
@@ -46,10 +46,10 @@ class SmoothScale(Gtk.Scale):
self._timeout = None
- self._controller = Gtk.GestureClick.new()
- self._controller.props.propagation_phase = Gtk.PropagationPhase.CAPTURE
- self._controller.connect("pressed", self._on_button_pressed)
- self._controller.connect("released", self._on_button_released)
+ ctrl = Gtk.GestureClick()
+ ctrl.connect("pressed", self._on_button_pressed)
+ ctrl.connect("released", self._on_button_released)
+ self.add_controller(ctrl)
self.connect('change-value', self._on_smooth_scale_seek)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]