[gnome-taquin/arnaudb/wip/gtk4: 24/43] Fix add_controller.



commit 3dc1d11f788919433624b452a0c370516410ab68
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Tue Apr 7 09:28:37 2020 +0200

    Fix add_controller.

 src/base-window.vala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/base-window.vala b/src/base-window.vala
index e4b6271..810b093 100644
--- a/src/base-window.vala
+++ b/src/base-window.vala
@@ -317,7 +317,7 @@ private class BaseWindow : AdaptativeWindow, AdaptativeWidget
     {
         key_controller = new Gtk.EventControllerKey ();
         key_controller.key_pressed.connect (on_key_pressed);
-        add_controller (key_controller);
+        ((Widget) this).add_controller (key_controller);
     }
 
     protected inline bool on_key_pressed (Gtk.EventControllerKey _key_controller, uint keyval, uint keycode, 
Gdk.ModifierType state)
@@ -444,7 +444,7 @@ private class BaseWindow : AdaptativeWindow, AdaptativeWidget
             about_dialog.response.connect ((_about_dialog, response) => _about_dialog.hide ());
             about_dialog_key_controller = new Gtk.EventControllerKey ();
             about_dialog_key_controller.key_pressed.connect (on_about_dialog_key_pressed);
-            about_dialog.add_controller (about_dialog_key_controller);
+            ((Widget) about_dialog).add_controller (about_dialog_key_controller);
             about_dialog.set_transient_for (this);
             should_init_about_dialog = false;
         }


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