From e8e1d7e629b9a4a65cde766ed81334140a749428 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine <vsavchuk@productengine.com>
Date: Mon, 15 Nov 2010 21:38:12 +0200
Subject: [PATCH] STORM-318 FIXED The Advanced menu shortcut was broken under
 Linux.

Reason: The old shortcut (Ctrl+Alt+D) was eaten by some window managers.

Changes:
- Changed the shortcut to Ctrl+Alt+Shift+D.
- Moved the appropriate menu item from "Advanced > Shortcuts" to "World > Show"
  (so that it's not in the menu it triggers) and made it visible.
  The old shortcut is still available but marked as legacy.

Submitting on behalf of Boroondas Gupte.
---
 doc/contributions.txt                         |  1 +
 .../skins/default/xui/en/menu_viewer.xml      | 42 +++++++++++--------
 2 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 46f025ae830..7773de47f8f 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -177,6 +177,7 @@ Boroondas Gupte
 	SNOW-610
 	SNOW-624
 	SNOW-737
+	STORM-318
 	VWR-233
 	VWR-20583
 	VWR-20891
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index b36cf13f1bb..796b15551a8 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -359,6 +359,18 @@
             <menu_item_check.on_check
                control="NavBarShowParcelProperties" />
           </menu_item_check>
+          <menu_item_separator />
+          <menu_item_check
+             label="Advanced Menu"
+             name="Show Advanced Menu"
+             shortcut="control|alt|shift|D">
+            <on_check
+               function="CheckControl"
+               parameter="UseDebugMenus" />
+            <on_click
+               function="ToggleControl"
+               parameter="UseDebugMenus" />
+          </menu_item_check>
         </menu>
 
         <menu_item_separator/>
@@ -1526,6 +1538,18 @@
                 <menu_item_call.on_click
                  function="View.DefaultUISize" />
             </menu_item_call>
+            <!-- This second, alternative shortcut for Show Advanced Menu is for backward compatibility.  The main shortcut has been changed so it's Linux-friendly, where the old shortcut is typically eaten by the window manager. -->
+            <menu_item_check
+               label="Show Advanced Menu - legacy shortcut"
+               name="Show Advanced Menu - legacy shortcut"
+               shortcut="control|alt|D">
+              <on_check
+                 function="CheckControl"
+                 parameter="UseDebugMenus" />
+              <on_click
+                 function="ToggleControl"
+                 parameter="UseDebugMenus" />
+            </menu_item_check>
 
             <menu_item_separator/>
 
@@ -1693,23 +1717,6 @@
                 <menu_item_call.on_click
                  function="View.ZoomOut" />
             </menu_item_call>
-            <menu_item_separator
-             visible="false"/>
-            <!-- Made invisible to avoid a dissonance: menu item toggles the menu where it is located. EXT-8069.
-              Can't be removed, to keep shortcut workable.
-            -->
-            <menu_item_check
-             label="Show Advanced Menu"
-             name="Show Advanced Menu"
-             shortcut="control|alt|D"
-             visible="false">
-                <on_check
-                 function="CheckControl"
-                 parameter="UseDebugMenus" />
-                <on_click
-                 function="ToggleControl"
-                 parameter="UseDebugMenus" />
-        </menu_item_check>
         </menu> <!--Shortcuts-->
 
         <menu_item_separator/>
@@ -1732,7 +1739,6 @@
              function="ToggleControl"
              parameter="QAMode" />
         </menu_item_check>
-    
     </menu>
     <menu
      create_jump_keys="true"
-- 
GitLab