From 9f5067486bf676842317d0b30f7bb2c559e603ec Mon Sep 17 00:00:00 2001 From: Lootyhoof Date: Tue, 9 Jun 2020 20:01:57 +0100 Subject: [PATCH] [Pale-Moon] Issue MoonchildProductions/UXP#1578 - Add global menubar support for GTK --- application/palemoon/base/content/browser-menubar.inc | 4 ++++ application/palemoon/base/content/browser.css | 4 ++++ application/palemoon/base/content/browser.js | 6 ++++++ application/palemoon/components/places/content/places.xul | 4 ++++ 4 files changed, 18 insertions(+) diff --git a/application/palemoon/base/content/browser-menubar.inc b/application/palemoon/base/content/browser-menubar.inc index fc6bc76943..8651d07bf4 100644 --- a/application/palemoon/base/content/browser-menubar.inc +++ b/application/palemoon/base/content/browser-menubar.inc @@ -5,7 +5,11 @@ diff --git a/application/palemoon/base/content/browser.css b/application/palemoon/base/content/browser.css index 91c6478d2d..2bab69b228 100644 --- a/application/palemoon/base/content/browser.css +++ b/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]) { diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index 09a0ff4de7..71e5320a75 100644 --- a/application/palemoon/base/content/browser.js +++ b/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"); diff --git a/application/palemoon/components/places/content/places.xul b/application/palemoon/components/places/content/places.xul index 92e8a70e9c..fd7843e7fb 100644 --- a/application/palemoon/components/places/content/places.xul +++ b/application/palemoon/components/places/content/places.xul @@ -153,8 +153,12 @@ #ifdef XP_MACOSX #else +#endif