[gnome-builder/wip/chergert/perspective] keybindings: add keybinding for global search



commit a608ee1021dba4de6d8d88a32fdc5f6ad812b324
Author: Christian Hergert <chergert redhat com>
Date:   Sat Dec 5 23:53:45 2015 -0800

    keybindings: add keybinding for global search
    
    Until we get an abstraction for this, just hard code it.

 data/keybindings/default.css     |    2 --
 data/keybindings/emacs.css       |    2 --
 data/keybindings/vim.css         |    1 -
 libide/ide-application-actions.c |    2 ++
 4 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/data/keybindings/default.css b/data/keybindings/default.css
index fe20d68..a9aa357 100644
--- a/data/keybindings/default.css
+++ b/data/keybindings/default.css
@@ -9,8 +9,6 @@
                   "clear-snippets" ()
                   "hide-completion" () };
   bind "<ctrl>f" { "action" ("frame", "find", "3") };
-  bind "<ctrl>period" { "action" ("perspective", "global-search", "") };
-  bind "<ctrl><alt>o" { "action" ("perspective", "global-search", "") };
   bind "<ctrl>n" { "action" ("workbench", "new-document", "") };
   bind "<ctrl>o" { "action" ("win", "open-with-dialog", "") };
   bind "<ctrl>s" { "action" ("view", "save", "") };
diff --git a/data/keybindings/emacs.css b/data/keybindings/emacs.css
index 5101024..c9f7942 100644
--- a/data/keybindings/emacs.css
+++ b/data/keybindings/emacs.css
@@ -59,7 +59,6 @@
   bind "<alt>x" { "action" ("win", "show-command-bar", "") };
   bind "<ctrl>r" { "action" ("frame", "find", "2") };
   bind "<ctrl>s" { "action" ("frame", "find", "3") };
-  bind "<ctrl>period" { "action" ("perspective", "global-search", "") };
   bind "<alt>period" { "goto-definition" () };
   bind "<alt>n" { "move-error" (down) };
   bind "<alt>p" { "move-error" (up) };
@@ -125,7 +124,6 @@
   bind "<ctrl>f" { "action" ("win", "open-with-dialog", "") };
   bind "<ctrl>s" { "action" ("view", "save", "") };
   bind "s" { "action" ("win", "save-all", "") };
-  bind "b" { "action" ("perspective", "global-search", "") };
   bind "<ctrl>b" { "action" ("view-stack", "show-list", "") };
   bind "<ctrl>w" { "action" ("view", "save-as", "") };
   bind "u" { "redo" () };
diff --git a/data/keybindings/vim.css b/data/keybindings/vim.css
index 9d754c0..0c6bb49 100644
--- a/data/keybindings/vim.css
+++ b/data/keybindings/vim.css
@@ -93,7 +93,6 @@
                              "hide-completion" ()
                              "set-mode" ("vim-normal", permanent) };
 
-  bind "<ctrl>period" { "action" ("perspective", "global-search", "") };
   bind "<ctrl>s" { "action" ("view", "save", "") };
   bind "<ctrl><shift>s" { "action" ("view", "save-as", "") };
   bind "<ctrl><shift>o" { "action" ("win", "open-with-dialog", "") };
diff --git a/libide/ide-application-actions.c b/libide/ide-application-actions.c
index be53a25..f344da6 100644
--- a/libide/ide-application-actions.c
+++ b/libide/ide-application-actions.c
@@ -269,6 +269,7 @@ ide_application_actions_init (IdeApplication *self)
   static const gchar *right[] = { "<shift>F9", NULL };
   static const gchar *bottom[] = { "<control>F9", NULL };
   static const gchar *preferences[] = { "<control>comma", NULL };
+  static const gchar *global_search[] = { "<control>period", NULL };
 
   g_action_map_add_action_entries (G_ACTION_MAP (self), IdeApplicationActions,
                                    G_N_ELEMENTS (IdeApplicationActions), self);
@@ -280,4 +281,5 @@ ide_application_actions_init (IdeApplication *self)
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "panels.right", right);
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "panels.bottom", bottom);
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "app.preferences", preferences);
+  gtk_application_set_accels_for_action (GTK_APPLICATION (self), "perspective.global-search", global_search);
 }


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