[gnome-music/wip/jfelder/gtk4-v3: 26/167] window: Fix EventController for GTK4




commit d97770ff7136437263484448fcfb27bbd8ea57a9
Author: Marinus Schraal <mschraal gnome org>
Date:   Sun Apr 11 20:34:47 2021 +0200

    window: Fix EventController for GTK4

 data/ui/Window.ui    | 11 ++++++-----
 gnomemusic/window.py |  1 -
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/data/ui/Window.ui b/data/ui/Window.ui
index 91892b5d9..1292d639d 100644
--- a/data/ui/Window.ui
+++ b/data/ui/Window.ui
@@ -3,6 +3,12 @@
   <template class="Window" parent="AdwApplicationWindow">
     <property name="default-height">500</property>
     <property name="default-width">300</property>
+    <child>
+      <object class="GtkEventControllerKey">
+        <property name="propagation-phase">capture</property>
+        <signal name="key-pressed" handler="_on_key_press" swapped="no"/>
+      </object>
+    </child>
     <child>
       <object class="GtkBox">
         <property name="orientation">vertical</property>
@@ -45,9 +51,4 @@
       </object>
     </child>
   </template>
-  <object class="GtkEventControllerKey" id="_key_controller">
-    <property name="widget">Window</property>
-    <property name="propagation-phase">capture</property>
-    <signal name="key-pressed" handler="_on_key_press" swapped="no"/>
-  </object>
 </interface>
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index e257b332e..23779b3c3 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -58,7 +58,6 @@ class Window(Adw.ApplicationWindow):
 
     notifications_popup = Gtk.Template.Child()
     _headerbar_stack = Gtk.Template.Child()
-    _key_controller = Gtk.Template.Child()
     _overlay = Gtk.Template.Child()
     _player_toolbar = Gtk.Template.Child()
     _selection_toolbar = Gtk.Template.Child()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]