[gnome-builder] buildui: wire up build/rebuild commands



commit 8a99bbfbdbee856f1b89cdfdf562a3e90206c4a0
Author: Christian Hergert <chergert redhat com>
Date:   Fri Aug 30 15:34:22 2019 -0700

    buildui: wire up build/rebuild commands
    
    These have been missing for some time by mistake.

 src/libide/gui/ide-shortcuts-window.ui            |  7 +++++++
 src/plugins/buildui/gbp-buildui-workspace-addin.c | 13 +++++++++++++
 2 files changed, 20 insertions(+)
---
diff --git a/src/libide/gui/ide-shortcuts-window.ui b/src/libide/gui/ide-shortcuts-window.ui
index 0793d4463..a52be98f8 100644
--- a/src/libide/gui/ide-shortcuts-window.ui
+++ b/src/libide/gui/ide-shortcuts-window.ui
@@ -465,6 +465,13 @@
                    <property name="title" translatable="yes" context="shortcut window">Build</property>
                 </object>
               </child>
+              <child>
+                <object class="GtkShortcutsShortcut">
+                  <property name="visible">true</property>
+                  <property name="accelerator">&lt;ctrl&gt;&lt;shift&gt;F7</property>
+                   <property name="title" translatable="yes" context="shortcut window">Rebuild</property>
+                </object>
+              </child>
               <child>
                 <object class="GtkShortcutsShortcut">
                   <property name="visible">true</property>
diff --git a/src/plugins/buildui/gbp-buildui-workspace-addin.c 
b/src/plugins/buildui/gbp-buildui-workspace-addin.c
index e6a21708c..1530ebe43 100644
--- a/src/plugins/buildui/gbp-buildui-workspace-addin.c
+++ b/src/plugins/buildui/gbp-buildui-workspace-addin.c
@@ -229,6 +229,7 @@ gbp_buildui_workspace_addin_load (IdeWorkspaceAddin *addin,
   GbpBuilduiWorkspaceAddin *self = (GbpBuilduiWorkspaceAddin *)addin;
   IdeConfigManager *config_manager;
   PangoAttrList *small_attrs = NULL;
+  DzlShortcutController *shortcuts;
   IdeEditorSidebar *sidebar;
   IdeBuildManager *build_manager;
   IdeWorkbench *workbench;
@@ -248,6 +249,18 @@ gbp_buildui_workspace_addin_load (IdeWorkspaceAddin *addin,
                                    G_N_ELEMENTS (actions),
                                    self);
 
+  shortcuts = dzl_shortcut_controller_find (GTK_WIDGET (workspace));
+  dzl_shortcut_controller_add_command_action (shortcuts,
+                                              "org.gnome.builder.buildui.build",
+                                              "<Control>F7",
+                                              DZL_SHORTCUT_PHASE_GLOBAL,
+                                              "build-manager.build");
+  dzl_shortcut_controller_add_command_action (shortcuts,
+                                              "org.gnome.builder.buildui.rebuild",
+                                              "<Control><Shift>F7",
+                                              DZL_SHORTCUT_PHASE_GLOBAL,
+                                              "build-manager.rebuild");
+
   headerbar = ide_workspace_get_header_bar (workspace);
   omnibar = IDE_OMNI_BAR (gtk_header_bar_get_custom_title (GTK_HEADER_BAR (headerbar)));
   workbench = ide_widget_get_workbench (GTK_WIDGET (workspace));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]