shortcutmanager: Name the controllers

This is helpful in the inspector.
This commit is contained in:
Matthias Clasen 2020-03-15 18:20:24 -04:00
parent ad69899a9d
commit 5a6a9dc149

View File

@ -43,11 +43,13 @@ gtk_shortcut_manager_create_controllers (GtkWidget *widget)
model = gtk_concat_model_new (GTK_TYPE_SHORTCUT);
g_object_set_data_full (G_OBJECT (widget), "gtk-shortcut-manager-bubble", model, g_object_unref);
controller = gtk_shortcut_controller_new_for_model (G_LIST_MODEL (model));
gtk_event_controller_set_name (controller, "gtk-shortcut-manager-bubble");
gtk_widget_add_controller (widget, controller);
model = gtk_concat_model_new (GTK_TYPE_SHORTCUT);
g_object_set_data_full (G_OBJECT (widget), "gtk-shortcut-manager-capture", model, g_object_unref);
controller = gtk_shortcut_controller_new_for_model (G_LIST_MODEL (model));
gtk_event_controller_set_name (controller, "gtk-shortcut-manager-capture");
gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
gtk_widget_add_controller (widget, controller);
}