Browse Source

[Pale-Moon] Issue MoonchildProductions/UXP#1578 - Add global menubar support for GTK

pull/24/head
Lootyhoof 2 years ago committed by Roy Tam
parent
commit
9f5067486b
  1. 4
      application/palemoon/base/content/browser-menubar.inc
  2. 4
      application/palemoon/base/content/browser.css
  3. 6
      application/palemoon/base/content/browser.js
  4. 4
      application/palemoon/components/places/content/places.xul

4
application/palemoon/base/content/browser-menubar.inc

@ -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">

4
application/palemoon/base/content/browser.css

@ -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]) {

6
application/palemoon/base/content/browser.js

@ -4600,6 +4600,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");

4
application/palemoon/components/places/content/places.xul

@ -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;"

Loading…
Cancel
Save