mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-26 17:17:31 +09:00
[Basilisk] Issue MoonchildProductions/UXP#1578 - Add global menubar support for GTK
This commit is contained in:
parent
8d5005090a
commit
be8bea50ff
3 changed files with 12 additions and 0 deletions
|
|
@ -5,7 +5,11 @@
|
||||||
|
|
||||||
<menubar id="main-menubar"
|
<menubar id="main-menubar"
|
||||||
onpopupshowing="if (event.target.parentNode.parentNode == this &&
|
onpopupshowing="if (event.target.parentNode.parentNode == this &&
|
||||||
|
#ifdef MOZ_WIDGET_GTK
|
||||||
|
document.documentElement.getAttribute('shellshowingmenubar') != 'true')
|
||||||
|
#else
|
||||||
!('@mozilla.org/widget/nativemenuservice;1' in Cc))
|
!('@mozilla.org/widget/nativemenuservice;1' in Cc))
|
||||||
|
#endif
|
||||||
this.setAttribute('openedwithkey',
|
this.setAttribute('openedwithkey',
|
||||||
event.target.parentNode.openedWithKey);"
|
event.target.parentNode.openedWithKey);"
|
||||||
style="border:0px;padding:0px;margin:0px;-moz-appearance:none">
|
style="border:0px;padding:0px;margin:0px;-moz-appearance:none">
|
||||||
|
|
|
||||||
|
|
@ -4698,6 +4698,10 @@ function getTogglableToolbars() {
|
||||||
let toolbarNodes = Array.slice(gNavToolbox.childNodes);
|
let toolbarNodes = Array.slice(gNavToolbox.childNodes);
|
||||||
toolbarNodes = toolbarNodes.concat(gNavToolbox.externalToolbars);
|
toolbarNodes = toolbarNodes.concat(gNavToolbox.externalToolbars);
|
||||||
toolbarNodes = toolbarNodes.filter(node => node.getAttribute("toolbarname"));
|
toolbarNodes = toolbarNodes.filter(node => node.getAttribute("toolbarname"));
|
||||||
|
#ifdef MOZ_WIDGET_GTK
|
||||||
|
if (document.documentElement.getAttribute("shellshowingmenubar") == "true")
|
||||||
|
toolbarNodes = toolbarNodes.filter(node => node.id != "toolbar-menubar");
|
||||||
|
#endif
|
||||||
return toolbarNodes;
|
return toolbarNodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -156,8 +156,12 @@
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
<toolbarbutton type="menu" class="tabbable"
|
<toolbarbutton type="menu" class="tabbable"
|
||||||
onpopupshowing="document.getElementById('placeContent').focus()"
|
onpopupshowing="document.getElementById('placeContent').focus()"
|
||||||
|
#else
|
||||||
|
#ifdef MOZ_WIDGET_GTK
|
||||||
|
<menubar id="placesMenu" _moz-menubarkeeplocal="true">
|
||||||
#else
|
#else
|
||||||
<menubar id="placesMenu">
|
<menubar id="placesMenu">
|
||||||
|
#endif
|
||||||
<menu accesskey="&organize.accesskey;" class="menu-iconic"
|
<menu accesskey="&organize.accesskey;" class="menu-iconic"
|
||||||
#endif
|
#endif
|
||||||
id="organizeButton" label="&organize.label;"
|
id="organizeButton" label="&organize.label;"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue