[gnome-nibbles/arnaudb/wip/gtk4: 12/40] Adapt to GtkEventController API.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles/arnaudb/wip/gtk4: 12/40] Adapt to GtkEventController API.
- Date: Tue, 16 Jun 2020 16:32:59 +0000 (UTC)
commit 7ee25ba69f86939c6f9b9a3d568ce740089fe692
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat May 30 18:44:55 2020 +0200
Adapt to GtkEventController API.
src/nibbles-window.vala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/nibbles-window.vala b/src/nibbles-window.vala
index ada34c9..cc6042d 100644
--- a/src/nibbles-window.vala
+++ b/src/nibbles-window.vala
@@ -112,8 +112,9 @@ private class NibblesWindow : ApplicationWindow
if (settings.get_boolean ("window-is-maximized"))
maximize ();
- key_controller = new EventControllerKey (this);
+ key_controller = new EventControllerKey ();
key_controller.key_pressed.connect (key_press_event_cb);
+ ((Widget) this).add_controller (key_controller);
/* Create game */
game = new NibblesGame (settings.get_int ("start-level"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]