[gnome-music/wip/mschraal/gtk4: 60/102] smoothscale: Fix event controller



commit 32bfeb6146a14b20880badcf82fc244c9446e607
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 20bc9164..769219ea 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]