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