[gnome-builder] project-tree: hide some actions when disabled



commit 6eec6cc631c7cd24aa54f283be55d2506bae07ca
Author: Christian Hergert <chergert redhat com>
Date:   Sun May 5 22:33:52 2019 -0700

    project-tree: hide some actions when disabled

 src/plugins/project-tree/gtk/menus.ui | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/plugins/project-tree/gtk/menus.ui b/src/plugins/project-tree/gtk/menus.ui
index 73ff2bd69..6342438cf 100644
--- a/src/plugins/project-tree/gtk/menus.ui
+++ b/src/plugins/project-tree/gtk/menus.ui
@@ -4,11 +4,13 @@
     <section id="project-tree-menu-new-section">
       <item>
         <attribute name="id">project-tree-menu-new-file</attribute>
+        <attribute name="hidden-when">action-disabled</attribute>
         <attribute name="label" translatable="yes">New File…</attribute>
         <attribute name="action">project-tree.new-file</attribute>
       </item>
       <item>
         <attribute name="id">project-tree-menu-new-folder</attribute>
+        <attribute name="hidden-when">action-disabled</attribute>
         <attribute name="label" translatable="yes">New Folder…</attribute>
         <attribute name="action">project-tree.new-folder</attribute>
       </item>
@@ -16,6 +18,7 @@
     <section id="project-tree-menu-open-section">
       <item>
         <attribute name="id">project-tree-menu-open</attribute>
+        <attribute name="hidden-when">action-disabled</attribute>
         <attribute name="label" translatable="yes">Open</attribute>
         <attribute name="action">project-tree.open</attribute>
       </item>
@@ -32,11 +35,13 @@
       </submenu>
       <item>
         <attribute name="id">project-tree-menu-open-folder</attribute>
+        <attribute name="hidden-when">action-disabled</attribute>
         <attribute name="label" translatable="yes">Open Containing Folder</attribute>
         <attribute name="action">project-tree.open-containing-folder</attribute>
       </item>
       <item>
         <attribute name="id">project-tree-menu-open-terminal</attribute>
+        <attribute name="hidden-when">action-disabled</attribute>
         <attribute name="label" translatable="yes">Open in Terminal</attribute>
         <attribute name="action">project-tree.open-in-terminal</attribute>
       </item>
@@ -44,11 +49,13 @@
     <section id="project-tree-menu-destructive-section">
       <item>
         <attribute name="id">project-tree-menu-rename</attribute>
+        <attribute name="hidden-when">action-disabled</attribute>
         <attribute name="label" translatable="yes">Rename</attribute>
         <attribute name="action">project-tree.rename</attribute>
       </item>
       <item>
         <attribute name="id">project-tree-menu-trash</attribute>
+        <attribute name="hidden-when">action-disabled</attribute>
         <attribute name="label" translatable="yes">Move to Trash</attribute>
         <attribute name="action">project-tree.trash</attribute>
       </item>


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