[Mypal] Add global menubar support for GTK.
This commit is contained in:
parent
f54a76c0b5
commit
5831766bbd
|
@ -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">
|
||||||
|
|
|
@ -226,6 +226,10 @@ splitmenu {
|
||||||
#appmenu-toolbar-button > .toolbarbutton-text {
|
#appmenu-toolbar-button > .toolbarbutton-text {
|
||||||
display: -moz-box;
|
display: -moz-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window[shellshowingmenubar="true"] #appmenu-toolbar-button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
#appmenu_offlineModeRecovery:not([checked=true]) {
|
#appmenu_offlineModeRecovery:not([checked=true]) {
|
||||||
|
|
|
@ -4540,6 +4540,12 @@ function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
|
||||||
toolbarNodes.push(document.getElementById("addon-bar"));
|
toolbarNodes.push(document.getElementById("addon-bar"));
|
||||||
|
|
||||||
for (let toolbar of toolbarNodes) {
|
for (let toolbar of toolbarNodes) {
|
||||||
|
#ifdef MOZ_WIDGET_GTK
|
||||||
|
if (toolbar.id == "toolbar-menubar" &&
|
||||||
|
document.documentElement.getAttribute("shellshowingmenubar") == "true") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
let toolbarName = toolbar.getAttribute("toolbarname");
|
let toolbarName = toolbar.getAttribute("toolbarname");
|
||||||
if (toolbarName) {
|
if (toolbarName) {
|
||||||
let menuItem = document.createElement("menuitem");
|
let menuItem = document.createElement("menuitem");
|
||||||
|
|
|
@ -153,8 +153,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…
Reference in New Issue
Block a user