diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2024-07-21 23:36:14 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2024-07-21 23:36:14 (GMT) |
commit | 6523d49b446139a1ec1e2134a2ea980765b7c66a (patch) | |
tree | 0636d28629bbd83058ec225884c7561bfaa5d98f | |
parent | d1874bdcaf52717ebf6f808010d275ca1f1693f3 (diff) |
Create a keyboard shortcut to close the main window.
-rw-r--r-- | src/gui/window.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/window.c b/src/gui/window.c index dcdd4d1..24716ed 100644 --- a/src/gui/window.c +++ b/src/gui/window.c @@ -79,6 +79,9 @@ static void gtk_framework_window_class_init(GtkFrameworkWindowClass *class) gtk_widget_class_bind_template_child(widget, GtkFrameworkWindow, grid); + /* Active une action native (cf. https://docs.gtk.org/gtk4/class.Window.html#actions) */ + gtk_widget_class_add_binding_action(widget, GDK_KEY_Q, GDK_CONTROL_MASK, "window.close", NULL); + } |