[gnome-builder/wip/chergert/perspective] keybindings: specify global keybinding for preferences



commit 4ca40c5694b948c59d263b2ddffb2739f40d8556
Author: Christian Hergert <chergert redhat com>
Date:   Sat Dec 5 23:51:26 2015 -0800

    keybindings: specify global keybinding for preferences
    
    Until we create a new keybindings abstraction, just hard code this here.

 data/keybindings/default.css     |    1 -
 data/keybindings/emacs.css       |    1 -
 data/keybindings/vim.css         |    1 -
 libide/ide-application-actions.c |    2 ++
 4 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/data/keybindings/default.css b/data/keybindings/default.css
index 3b97617..fe20d68 100644
--- a/data/keybindings/default.css
+++ b/data/keybindings/default.css
@@ -8,7 +8,6 @@
                   "clear-count" ()
                   "clear-snippets" ()
                   "hide-completion" () };
-  bind "<ctrl>comma" { "action" ("app", "preferences", "") };
   bind "<ctrl>f" { "action" ("frame", "find", "3") };
   bind "<ctrl>period" { "action" ("perspective", "global-search", "") };
   bind "<ctrl><alt>o" { "action" ("perspective", "global-search", "") };
diff --git a/data/keybindings/emacs.css b/data/keybindings/emacs.css
index 016e681..5101024 100644
--- a/data/keybindings/emacs.css
+++ b/data/keybindings/emacs.css
@@ -61,7 +61,6 @@
   bind "<ctrl>s" { "action" ("frame", "find", "3") };
   bind "<ctrl>period" { "action" ("perspective", "global-search", "") };
   bind "<alt>period" { "goto-definition" () };
-  bind "<ctrl>comma" { "action" ("app", "preferences", "") };
   bind "<alt>n" { "move-error" (down) };
   bind "<alt>p" { "move-error" (up) };
   bind "<ctrl>j" { "action" ("view-grid", "focus-neighbor", "3") };
diff --git a/data/keybindings/vim.css b/data/keybindings/vim.css
index 3345efc..9d754c0 100644
--- a/data/keybindings/vim.css
+++ b/data/keybindings/vim.css
@@ -93,7 +93,6 @@
                              "hide-completion" ()
                              "set-mode" ("vim-normal", permanent) };
 
-  bind "<ctrl>comma" { "action" ("app", "preferences", "") };
   bind "<ctrl>period" { "action" ("perspective", "global-search", "") };
   bind "<ctrl>s" { "action" ("view", "save", "") };
   bind "<ctrl><shift>s" { "action" ("view", "save-as", "") };
diff --git a/libide/ide-application-actions.c b/libide/ide-application-actions.c
index 999d303..be53a25 100644
--- a/libide/ide-application-actions.c
+++ b/libide/ide-application-actions.c
@@ -268,6 +268,7 @@ ide_application_actions_init (IdeApplication *self)
   static const gchar *left[] = { "F9", NULL };
   static const gchar *right[] = { "<shift>F9", NULL };
   static const gchar *bottom[] = { "<control>F9", NULL };
+  static const gchar *preferences[] = { "<control>comma", NULL };
 
   g_action_map_add_action_entries (G_ACTION_MAP (self), IdeApplicationActions,
                                    G_N_ELEMENTS (IdeApplicationActions), self);
@@ -278,4 +279,5 @@ ide_application_actions_init (IdeApplication *self)
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), "panels.left", left);
   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);
 }


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