[gtk/wip/matthiasc/shortcut] window: Name the the controllers
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/shortcut] window: Name the the controllers
- Date: Sun, 15 Mar 2020 22:28:46 +0000 (UTC)
commit 4f2fbecf5cbe3c8b0f4fa937bcc03f7ec327ab02
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 15 18:20:40 2020 -0400
window: Name the the controllers
gtk/gtkwindow.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index b51cdf9d5d..1158ea009a 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1804,6 +1804,7 @@ gtk_window_init (GtkWindow *window)
shortcut = gtk_shortcut_new (gtk_keyval_trigger_new (MENU_BAR_ACCEL, 0),
gtk_callback_action_new (gtk_window_activate_menubar, NULL, NULL));
gtk_shortcut_controller_add_shortcut (GTK_SHORTCUT_CONTROLLER (controller), shortcut);
+ gtk_event_controller_set_name (controller, "gtk-window-menubar-accel");
gtk_widget_add_controller (widget, controller);
}
@@ -2846,6 +2847,7 @@ gtk_window_set_application (GtkWindow *window,
app_accels = gtk_application_get_application_accels (priv->application);
priv->application_shortcut_controller = gtk_shortcut_controller_new_for_model
(gtk_application_accels_get_shortcuts (app_accels));
+ gtk_event_controller_set_name (priv->application_shortcut_controller, "gtk-application-shortcuts");
gtk_event_controller_set_propagation_phase (priv->application_shortcut_controller,
GTK_PHASE_CAPTURE);
gtk_shortcut_controller_set_scope (GTK_SHORTCUT_CONTROLLER
(priv->application_shortcut_controller), GTK_SHORTCUT_SCOPE_GLOBAL);
gtk_widget_add_controller (GTK_WIDGET (window), priv->application_shortcut_controller);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]