summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2021-01-09 13:43:31 -0500
committerGaming4JC <g4jc@hyperbola.info>2021-01-09 14:11:59 -0500
commit4f946b0b2cd05f8c9620ba762eab7177f3b56d89 (patch)
tree83b258de06a98f85bb6fca407a9d1043d7063d9b /base
parentb5e55511b60b6bd0b8c444859997c2fa45ded342 (diff)
downloadiceweasel-uxp-4f946b0b2cd05f8c9620ba762eab7177f3b56d89.tar.gz
Backport UXP#1578 - Add global menubar support for GTK
Diffstat (limited to 'base')
-rw-r--r--base/content/browser-menubar.inc4
-rwxr-xr-xbase/content/browser.js4
2 files changed, 8 insertions, 0 deletions
diff --git a/base/content/browser-menubar.inc b/base/content/browser-menubar.inc
index 702c5ec..04e4634 100644
--- a/base/content/browser-menubar.inc
+++ b/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">
diff --git a/base/content/browser.js b/base/content/browser.js
index 22838d1..352f5e6 100755
--- a/base/content/browser.js
+++ b/base/content/browser.js
@@ -4708,6 +4708,10 @@ function getTogglableToolbars() {
let toolbarNodes = Array.slice(gNavToolbox.childNodes);
toolbarNodes = toolbarNodes.concat(gNavToolbox.externalToolbars);
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;
}