commit b0cbd847e07bce67172f65370b5c51efd30ea5f1 Author: Nicolas Vigier boklm@torproject.org Date: Tue Jun 30 18:21:19 2015 +0200
Add patch to fix menu on OSX
(patch from ticket #16253, found by Arlo) --- ...refox-app-menu-sometimes-contains-only.mozpatch | 66 ++++++++++++++++++++ projects/instantbird/config | 2 + 2 files changed, 68 insertions(+)
diff --git a/projects/instantbird/Bug-1151345-Firefox-app-menu-sometimes-contains-only.mozpatch b/projects/instantbird/Bug-1151345-Firefox-app-menu-sometimes-contains-only.mozpatch new file mode 100644 index 0000000..191ae56 --- /dev/null +++ b/projects/instantbird/Bug-1151345-Firefox-app-menu-sometimes-contains-only.mozpatch @@ -0,0 +1,66 @@ +From bfb108f8d8ba5c748ac0daa027271b063fd503b1 Mon Sep 17 00:00:00 2001 +From: Steven Michaud smichaud@pobox.com +Date: Wed, 3 Jun 2015 16:19:51 -0500 +Subject: [PATCH] Bug 1151345 - Firefox app menu sometimes contains only "Quit" + on OS X. r=spohl + +--- + widget/cocoa/nsAppShell.mm | 2 ++ + widget/cocoa/nsMenuBarX.h | 1 + + widget/cocoa/nsMenuBarX.mm | 8 ++++++++ + 3 files changed, 11 insertions(+) + +diff --git a/widget/cocoa/nsAppShell.mm b/widget/cocoa/nsAppShell.mm +index 10e0f0e..c89cee9 100644 +--- a/widget/cocoa/nsAppShell.mm ++++ b/widget/cocoa/nsAppShell.mm +@@ -28,6 +28,7 @@ + #include "nsCocoaFeatures.h" + #include "nsCocoaUtils.h" + #include "nsChildView.h" ++#include "nsMenuBarX.h" + #include "nsToolkit.h" + #include "TextInputHandler.h" + #include "mozilla/HangMonitor.h" +@@ -647,6 +648,7 @@ nsAppShell::Run(void) + mStarted = true; + + AddScreenWakeLockListener(); ++ nsMenuBarX::ResetNativeApplicationMenu(); + + NS_OBJC_TRY_ABORT([NSApp run]); + +diff --git a/widget/cocoa/nsMenuBarX.h b/widget/cocoa/nsMenuBarX.h +index a27d373..50f76cb 100644 +--- a/widget/cocoa/nsMenuBarX.h ++++ b/widget/cocoa/nsMenuBarX.h +@@ -127,6 +127,7 @@ public: + void ForceUpdateNativeMenuAt(const nsAString& indexString); + void ForceNativeMenuReload(); // used for testing + static char GetLocalizedAccelKey(const char *shortcutID); ++ static void ResetNativeApplicationMenu(); + + protected: + void ConstructNativeMenus(); +diff --git a/widget/cocoa/nsMenuBarX.mm b/widget/cocoa/nsMenuBarX.mm +index 90c681f..5e13538 100644 +--- a/widget/cocoa/nsMenuBarX.mm ++++ b/widget/cocoa/nsMenuBarX.mm +@@ -498,6 +498,14 @@ char nsMenuBarX::GetLocalizedAccelKey(const char *shortcutID) + return retval; + } + ++/* static */ ++void nsMenuBarX::ResetNativeApplicationMenu() ++{ ++ [sApplicationMenu removeAllItems]; ++ [sApplicationMenu release]; ++ sApplicationMenu = nil; ++} ++ + // Hide the item in the menu by setting the 'hidden' attribute. Returns it in |outHiddenNode| so + // the caller can hang onto it if they so choose. It is acceptable to pass nsull + // for |outHiddenNode| if the caller doesn't care about the hidden node. +-- +2.1.4 + diff --git a/projects/instantbird/config b/projects/instantbird/config index 11c3b36..1e17ae9 100644 --- a/projects/instantbird/config +++ b/projects/instantbird/config @@ -116,6 +116,8 @@ input_files: enable: '[% c("var/windows") %]' - filename: OSX-package-as-tar.bz2.mozpatch enable: '[% c("var/osx") %]' + - filename: Bug-1151345-Firefox-app-menu-sometimes-contains-only.mozpatch + enable: '[% c("var/osx") %]' - filename: 'mozconfig-[% c("var/osname") %]' name: mozconfig - name: python