[Mypal] Add global menubar support for GTK.

master
Fedor 2020-07-16 04:15:46 +03:00
parent f54a76c0b5
commit 5831766bbd
4 changed files with 18 additions and 0 deletions

View File

@ -5,7 +5,11 @@
<menubar id="main-menubar"
onpopupshowing="if (event.target.parentNode.parentNode == this &amp;&amp;
#ifdef MOZ_WIDGET_GTK
document.documentElement.getAttribute('shellshowingmenubar') != 'true')
#else
!('@mozilla.org/widget/nativemenuservice;1' in Cc))
#endif
this.setAttribute('openedwithkey',
event.target.parentNode.openedWithKey);"
style="border:0px;padding:0px;margin:0px;-moz-appearance:none">

View File

@ -226,6 +226,10 @@ splitmenu {
#appmenu-toolbar-button > .toolbarbutton-text {
display: -moz-box;
}
window[shellshowingmenubar="true"] #appmenu-toolbar-button {
display: none;
}
%endif
#appmenu_offlineModeRecovery:not([checked=true]) {

View File

@ -4540,6 +4540,12 @@ function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
toolbarNodes.push(document.getElementById("addon-bar"));
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");
if (toolbarName) {
let menuItem = document.createElement("menuitem");

View File

@ -153,8 +153,12 @@
#ifdef XP_MACOSX
<toolbarbutton type="menu" class="tabbable"
onpopupshowing="document.getElementById('placeContent').focus()"
#else
#ifdef MOZ_WIDGET_GTK
<menubar id="placesMenu" _moz-menubarkeeplocal="true">
#else
<menubar id="placesMenu">
#endif
<menu accesskey="&organize.accesskey;" class="menu-iconic"
#endif
id="organizeButton" label="&organize.label;"