[gnome-builder/wip/chergert/layout] shortcuts: track shortcut changes in libdazzle



commit 8c0cf077d3a08e6155bdb3626034d79a885677f3
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jul 19 02:40:19 2017 -0700

    shortcuts: track shortcut changes in libdazzle
    
    This tracks the change in dazzle that fixes our keybinding activation for
    global keybindings.

 libide/editor/ide-editor-perspective-shortcuts.c |   16 ++++++++--------
 libide/editor/ide-editor-view-shortcuts.c        |    9 +++++++++
 libide/layout/ide-layout-stack-shortcuts.c       |    5 +++++
 plugins/command-bar/gb-command-bar.c             |    6 +++---
 4 files changed, 25 insertions(+), 11 deletions(-)
---
diff --git a/libide/editor/ide-editor-perspective-shortcuts.c 
b/libide/editor/ide-editor-perspective-shortcuts.c
index f588af5..80bb5cd 100644
--- a/libide/editor/ide-editor-perspective-shortcuts.c
+++ b/libide/editor/ide-editor-perspective-shortcuts.c
@@ -29,25 +29,25 @@
 
 static const DzlShortcutEntry editor_perspective_entries[] = {
   { "org.gnome.builder.editor.new-file",
-    NULL,
+    0, NULL,
     N_("Editor"),
     N_("Files"),
     N_("Create a new document") },
 
   { "org.gnome.builder.editor.open-file",
-    NULL,
+    0, NULL,
     N_("Editor"),
     N_("Files"),
     N_("Open a document") },
 
   { "org.gnome.builder.editor.navigation-panel",
-    NULL,
+    0, NULL,
     N_("Editor"),
     N_("Panels"),
     N_("Toggle navigation panel") },
 
   { "org.gnome.builder.editor.utilities-panel",
-    NULL,
+    0, NULL,
     N_("Editor"),
     N_("Panels"),
     N_("Toggle utilities panel") },
@@ -65,25 +65,25 @@ _ide_editor_perspective_init_shortcuts (IdeEditorPerspective *self)
   dzl_shortcut_controller_add_command_action (controller,
                                               I_("org.gnome.builder.editor.new-file"),
                                               I_("<Primary>n"),
-                                              DZL_SHORTCUT_PHASE_BUBBLE,
+                                              DZL_SHORTCUT_PHASE_GLOBAL,
                                               I_("editor.new-file"));
 
   dzl_shortcut_controller_add_command_action (controller,
                                               I_("org.gnome.builder.editor.open-file"),
                                               I_("<Primary>o"),
-                                              DZL_SHORTCUT_PHASE_BUBBLE,
+                                              DZL_SHORTCUT_PHASE_GLOBAL,
                                               I_("editor.open-file"));
 
   dzl_shortcut_controller_add_command_action (controller,
                                               I_("org.gnome.builder.editor.navigation-panel"),
                                               I_("F9"),
-                                              DZL_SHORTCUT_PHASE_BUBBLE,
+                                              DZL_SHORTCUT_PHASE_GLOBAL,
                                               I_("dockbin.left-visible"));
 
   dzl_shortcut_controller_add_command_action (controller,
                                               I_("org.gnome.builder.editor.utilities-panel"),
                                               I_("<Control>F9"),
-                                              DZL_SHORTCUT_PHASE_BUBBLE,
+                                              DZL_SHORTCUT_PHASE_GLOBAL,
                                               I_("dockbin.bottom-visible"));
 
   dzl_shortcut_manager_add_shortcut_entries (NULL,
diff --git a/libide/editor/ide-editor-view-shortcuts.c b/libide/editor/ide-editor-view-shortcuts.c
index e2907da..b138bcb 100644
--- a/libide/editor/ide-editor-view-shortcuts.c
+++ b/libide/editor/ide-editor-view-shortcuts.c
@@ -27,54 +27,63 @@
 
 static DzlShortcutEntry editor_view_shortcuts[] = {
   { "org.gnome.builder.editor-view.save",
+    DZL_SHORTCUT_PHASE_BUBBLE,
     "<Primary>s",
     N_("Editor"),
     N_("Files"),
     N_("Save the document") },
 
   { "org.gnome.builder.editor-view.save-as",
+    DZL_SHORTCUT_PHASE_BUBBLE,
     "<Primary><shift>s",
     N_("Editor"),
     N_("Files"),
     N_("Save the document with a new name") },
 
   { "org.gnome.builder.editor-view.find",
+    DZL_SHORTCUT_PHASE_BUBBLE,
     "<Primary>f",
     N_("Editor"),
     N_("Find and replace"),
     N_("Find") },
 
   { "org.gnome.builder.editor-view.find-and-replace",
+    DZL_SHORTCUT_PHASE_BUBBLE,
     "<Primary>h",
     N_("Editor"),
     N_("Find and replace"),
     N_("Find and replace") },
 
   { "org.gnome.builder.editor-view.next-match",
+    DZL_SHORTCUT_PHASE_BUBBLE,
     "<Primary>g",
     N_("Editor"),
     N_("Find and replace"),
     N_("Move to the next match") },
 
   { "org.gnome.builder.editor-view.prev-match",
+    DZL_SHORTCUT_PHASE_BUBBLE,
     "<Primary><Shift>g",
     N_("Editor"),
     N_("Find and replace"),
     N_("Move to the previous match") },
 
   { "org.gnome.builder.editor-view.next-error",
+    DZL_SHORTCUT_PHASE_BUBBLE,
     NULL,
     N_("Editor"),
     N_("Find and replace"),
     N_("Move to the next error") },
 
   { "org.gnome.builder.editor-view.prev-error",
+    DZL_SHORTCUT_PHASE_BUBBLE,
     NULL,
     N_("Editor"),
     N_("Find and replace"),
     N_("Move to the previous error") },
 
   { "org.gnome.builder.editor-view.clear-highlight",
+    DZL_SHORTCUT_PHASE_BUBBLE,
     "<Primary><Shift>k",
     N_("Editor"),
     N_("Find and replace"),
diff --git a/libide/layout/ide-layout-stack-shortcuts.c b/libide/layout/ide-layout-stack-shortcuts.c
index 7d84be6..a2b5e79 100644
--- a/libide/layout/ide-layout-stack-shortcuts.c
+++ b/libide/layout/ide-layout-stack-shortcuts.c
@@ -27,30 +27,35 @@
 
 static const DzlShortcutEntry stack_shortcuts[] = {
   { "org.gnome.builder.layoutstack.move-right",
+    DZL_SHORTCUT_PHASE_CAPTURE,
     NULL,
     N_("Editor"),
     N_("Files"),
     N_("Move document to the right") },
 
   { "org.gnome.builder.layoutstack.move-left",
+    DZL_SHORTCUT_PHASE_CAPTURE,
     NULL,
     N_("Editor"),
     N_("Files"),
     N_("Move document to the left") },
 
   { "org.gnome.builder.layoutstack.previous-document",
+    DZL_SHORTCUT_PHASE_CAPTURE,
     NULL,
     N_("Editor"),
     N_("Files"),
     N_("Search to the previous document") },
 
   { "org.gnome.builder.layoutstack.next-document",
+    DZL_SHORTCUT_PHASE_CAPTURE,
     NULL,
     N_("Editor"),
     N_("Files"),
     N_("Switch to the next document") },
 
   { "org.gnome.builder.layoutstack.close-view",
+    DZL_SHORTCUT_PHASE_BUBBLE,
     NULL,
     N_("Editor"),
     N_("Files"),
diff --git a/plugins/command-bar/gb-command-bar.c b/plugins/command-bar/gb-command-bar.c
index 153e27b..b324d61 100644
--- a/plugins/command-bar/gb-command-bar.c
+++ b/plugins/command-bar/gb-command-bar.c
@@ -711,7 +711,7 @@ gb_command_bar_class_finalize (GbCommandBarClass *klass)
 
 static const DzlShortcutEntry shortcuts[] = {
   { "org.gnome.builder.show-command-bar",
-    "<Primary>Return",
+    0, NULL,
     N_("Editor"),
     N_("General"),
     N_("Command Bar") },
@@ -738,8 +738,8 @@ gb_command_bar_init (GbCommandBar *self)
 
   dzl_shortcut_controller_add_command_action (controller,
                                               I_("org.gnome.builder.show-command-bar"),
-                                              NULL,
-                                              DZL_SHORTCUT_PHASE_BUBBLE,
+                                              I_("<Primary>Return"),
+                                              DZL_SHORTCUT_PHASE_CAPTURE | DZL_SHORTCUT_PHASE_GLOBAL,
                                               I_("win.show-command-bar"));
 
   dzl_shortcut_manager_add_shortcut_entries (NULL,


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