[gnome-builder/wip/gtk4-port: 881/1774] libide/gui: setup shortcut controller
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 881/1774] libide/gui: setup shortcut controller
- Date: Mon, 11 Jul 2022 22:31:27 +0000 (UTC)
commit 2ba16e464a3074877a3e0e933c36f58d6d467e9d
Author: Christian Hergert <chergert redhat com>
Date: Thu May 5 17:41:41 2022 -0700
libide/gui: setup shortcut controller
This still needs to have a separate one for capture/bubble.
src/libide/gui/ide-workbench.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/libide/gui/ide-workbench.c b/src/libide/gui/ide-workbench.c
index 2d364db87..7a09bafdf 100644
--- a/src/libide/gui/ide-workbench.c
+++ b/src/libide/gui/ide-workbench.c
@@ -786,6 +786,7 @@ ide_workbench_add_workspace (IdeWorkbench *self,
{
g_autoptr(GPtrArray) addins = NULL;
IdeCommandManager *command_manager;
+ GtkEventController *shortcuts;
GList *mru_link;
g_return_if_fail (IDE_IS_MAIN_THREAD ());
@@ -828,6 +829,12 @@ ide_workbench_add_workspace (IdeWorkbench *self,
if (self->project_info != NULL)
insert_action_groups_foreach_cb (workspace, self);
+ /* Setup shortcut controller for workspace */
+ /* TODO: do separate for capture/bubble w/ filter list model */
+ shortcuts = gtk_shortcut_controller_new_for_model (G_LIST_MODEL (self->shortcuts));
+ gtk_event_controller_set_name (shortcuts, "ide-shortcuts");
+ gtk_widget_add_controller (GTK_WIDGET (workspace), shortcuts);
+
/* Track toplevel focus changes to maintain a most-recently-used queue. */
g_signal_connect_object (workspace,
"notify::is-active",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]