menus: hide some menu items on macOS.

File/Quit, Edit/Preferences|Input Devices|Keyboard Shortcuts should not be in
the main menu bar on macOS because they are already in the "app menu".

See #9322.
This commit is contained in:
Jehan 2023-07-13 23:41:18 +02:00
parent 4c1ae49fc9
commit 982d32e79e
1 changed files with 16 additions and 4 deletions

View File

@ -59,7 +59,10 @@
<section>
<item><attribute name="action">app.view-close</attribute></item>
<item><attribute name="action">app.file-close-all</attribute></item>
<item><attribute name="action">app.file-quit</attribute></item>
<item>
<attribute name="hidden-when">macos-menubar</attribute>
<attribute name="action">app.file-quit</attribute>
</item>
</section>
</submenu>
@ -106,10 +109,19 @@
</section>
<section>
<attribute name="section-name" translatable="no">Preferences</attribute>
<item><attribute name="action">app.dialogs-preferences</attribute></item>
<item>
<attribute name="hidden-when">macos-menubar</attribute>
<attribute name="action">app.dialogs-preferences</attribute>
</item>
<item><attribute name="action">app.dialogs-extensions</attribute></item>
<item><attribute name="action">app.dialogs-input-devices</attribute></item>
<item><attribute name="action">app.dialogs-keyboard-shortcuts</attribute></item>
<item>
<attribute name="hidden-when">macos-menubar</attribute>
<attribute name="action">app.dialogs-input-devices</attribute>
</item>
<item>
<attribute name="hidden-when">macos-menubar</attribute>
<attribute name="action">app.dialogs-keyboard-shortcuts</attribute>
</item>
<item><attribute name="action">app.dialogs-module-dialog</attribute></item>
</section>
</submenu>