[gnome-music/wip/mschraal/gtk4: 136/141] smoothscale: Fix event controller
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4: 136/141] smoothscale: Fix event controller
- Date: Mon, 17 Feb 2020 19:37:44 +0000 (UTC)
commit dc08d570bae7d62ecc24513a38f559386066ddec
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]