[gnome-builder] plugins/codeui: bring back alt+period accelerator



commit 31429305cc611238d46440848560179080b3dda0
Author: Christian Hergert <chergert redhat com>
Date:   Wed Sep 21 22:42:49 2022 -0700

    plugins/codeui: bring back alt+period accelerator
    
    Similar to gd/gD in Vim.

 src/plugins/codeui/codeui.gresource.xml | 1 +
 src/plugins/codeui/gtk/keybindings.json | 1 +
 src/plugins/codeui/gtk/menus.ui         | 1 +
 3 files changed, 3 insertions(+)
---
diff --git a/src/plugins/codeui/codeui.gresource.xml b/src/plugins/codeui/codeui.gresource.xml
index 1eb2d12e7..4be116839 100644
--- a/src/plugins/codeui/codeui.gresource.xml
+++ b/src/plugins/codeui/codeui.gresource.xml
@@ -5,5 +5,6 @@
     <file preprocess="xml-stripblanks">gbp-codeui-range-dialog.ui</file>
     <file preprocess="xml-stripblanks">gbp-codeui-rename-dialog.ui</file>
     <file preprocess="xml-stripblanks">gtk/menus.ui</file>
+    <file>gtk/keybindings.json</file>
   </gresource>
 </gresources>
diff --git a/src/plugins/codeui/gtk/keybindings.json b/src/plugins/codeui/gtk/keybindings.json
new file mode 100644
index 000000000..e5187df68
--- /dev/null
+++ b/src/plugins/codeui/gtk/keybindings.json
@@ -0,0 +1 @@
+{ "trigger" : "<Alt>period", "action" : "page.codeui.goto-declaration", "when" : "canEdit()", "phase" : 
"capture" },
diff --git a/src/plugins/codeui/gtk/menus.ui b/src/plugins/codeui/gtk/menus.ui
index d22d52921..0758149c5 100644
--- a/src/plugins/codeui/gtk/menus.ui
+++ b/src/plugins/codeui/gtk/menus.ui
@@ -13,6 +13,7 @@
         <attribute name="label" translatable="yes">_Go to Declaration</attribute>
         <attribute name="description" translatable="yes">Jump to file and location where item is 
declared</attribute>
         <attribute name="action">page.codeui.goto-declaration</attribute>
+        <attribute name="accel">&lt;alt&gt;period</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes">_Go to Definition</attribute>


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