[gnome-builder] libide/editor: move keybindings to keybindings.json



commit b777443afcb3da4950beb37a8a049a597a5553a0
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jul 27 21:11:32 2022 -0700

    libide/editor: move keybindings to keybindings.json
    
    These will be easier to override if we get them into a JSON file instead
    of the the class definition.

 src/libide/editor/ide-editor-page.c       | 4 ----
 src/plugins/editorui/gtk/keybindings.json | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libide/editor/ide-editor-page.c b/src/libide/editor/ide-editor-page.c
index 6c10d4975..8781d49b2 100644
--- a/src/libide/editor/ide-editor-page.c
+++ b/src/libide/editor/ide-editor-page.c
@@ -513,10 +513,6 @@ ide_editor_page_class_init (IdeEditorPageClass *klass)
   panel_widget_class_install_action (panel_widget_class, "search.begin-find", NULL, 
search_begin_find_action);
   panel_widget_class_install_action (panel_widget_class, "search.begin-replace", NULL, 
search_begin_replace_action);
 
-  gtk_widget_class_add_binding_action (widget_class, GDK_KEY_s, GDK_CONTROL_MASK, "page.save", NULL);
-  gtk_widget_class_add_binding_action (widget_class, GDK_KEY_f, GDK_CONTROL_MASK, "search.begin-find", NULL);
-  gtk_widget_class_add_binding_action (widget_class, GDK_KEY_h, GDK_CONTROL_MASK, "search.begin-replace", 
NULL);
-
   _ide_editor_page_class_actions_init (klass);
 
   g_type_ensure (IDE_TYPE_EDITOR_SEARCH_BAR);
diff --git a/src/plugins/editorui/gtk/keybindings.json b/src/plugins/editorui/gtk/keybindings.json
index 3003dfeaa..64f74990c 100644
--- a/src/plugins/editorui/gtk/keybindings.json
+++ b/src/plugins/editorui/gtk/keybindings.json
@@ -1,2 +1,6 @@
 { "trigger" : "<Control>i", "action" : "editorui.show-go-to-line", "when" : "canEdit()", "phase" : "capture" 
},
 { "trigger" : "<Shift><Alt>f", "action": "editorui.format", "when" : "canEdit()", "phase" : "capture" },
+{ "trigger" : "<Control>f", "action" : "page.search.begin-find", "when" : "canEdit()", "phase" : "capture" },
+{ "trigger" : "<Control>h", "action" : "page.search.begin-replace", "when" : "canEdit()", "phase" : 
"capture" },
+{ "trigger" : "<Control>s", "action" : "page.save", "when" : "canEdit()", "phase" : "capture" },
+{ "trigger" : "<Control><Shift>s", "action" : "page.save-as", "when" : "canEdit()", "phase" : "capture" },


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