[gnome-music/wip/mschraal/gtk4: 136/143] mediakeys: Fix event controller
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4: 136/143] mediakeys: Fix event controller
- Date: Sun, 19 Jan 2020 10:55:47 +0000 (UTC)
commit c278ff54214ea0ded3ee9e4778cc7be7c20a3ecc
Author: Marinus Schraal <mschraal gnome org>
Date: Wed Nov 6 23:57:00 2019 +0100
mediakeys: Fix event controller
gnomemusic/mediakeys.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/mediakeys.py b/gnomemusic/mediakeys.py
index a5ee82f4..8d7a586f 100644
--- a/gnomemusic/mediakeys.py
+++ b/gnomemusic/mediakeys.py
@@ -81,12 +81,12 @@ class MediaKeys(GObject.GObject):
self._media_keys_proxy.connect("g-signal", self._handle_media_keys)
- self._ctrlr = Gtk.EventControllerKey().new()
- self._ctrlr.props.propagation_phase = Gtk.PropagationPhase.CAPTURE
- self._ctrlr.connect("focus-in", self._grab_media_player_keys)
+ ctrl = Gtk.EventControllerKey()
+ ctrl.connect("focus-in", self._grab_media_player_keys)
+ self._window.add_controller(ctrl)
@log
- def _grab_media_player_keys(self, controllerkey=None):
+ def _grab_media_player_keys(self, controller, mode, detail):
def proxy_call_finished(proxy, result, data=None):
try:
proxy.call_finish(result)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]