[Libreoffice-commits] core.git: vcl/inc vcl/osx

Tor Lillqvist tml at collabora.com
Thu May 24 17:39:37 UTC 2018


 vcl/inc/osx/salmenu.h |    2 --
 vcl/osx/salmenu.cxx   |   18 +-----------------
 2 files changed, 1 insertion(+), 19 deletions(-)

New commits:
commit db18cec885499f0c34681c323b0f70e0f9e11f4b
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu May 24 17:35:01 2018 +0300

    Bin ancient AQUA_NATIVE_MENUS=FALSE crack
    
    Using the system ("native") menubar works fine since a long time
    surely. No reason to keep a fallback possibility.
    
    Change-Id: I0d9ed86c28b0d832c8123b18980740dbf895ec1c
    Reviewed-on: https://gerrit.libreoffice.org/54775
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/vcl/inc/osx/salmenu.h b/vcl/inc/osx/salmenu.h
index f98e44ca0c23..597180cc1ac3 100644
--- a/vcl/inc/osx/salmenu.h
+++ b/vcl/inc/osx/salmenu.h
@@ -56,8 +56,6 @@ public:
     virtual ~AquaSalMenu() override;
 
     virtual bool VisibleMenuBar() override;
-    // must return true to actually display native menu bars
-    // otherwise only menu messages are processed (eg, OLE on Windows)
 
     virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) override;
     virtual void RemoveItem( unsigned nPos ) override;
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index 9122f54c456c..f9ccbb310062 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -317,11 +317,6 @@ AquaSalMenu::~AquaSalMenu()
 
 bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags)
 {
-    // do not use native popup menu when AQUA_NATIVE_MENUS is set to false
-    if( ! VisibleMenuBar() ) {
-        return false;
-    }
-
     // set offsets for positioning
     const float offset = 9.0;
 
@@ -488,17 +483,6 @@ void AquaSalMenu::removeFallbackMenuItem( NSMenuItem* pOldItem )
 
 bool AquaSalMenu::VisibleMenuBar()
 {
-    // Enable/disable experimental native menus code?
-
-    // To disable native menus, set the environment variable AQUA_NATIVE_MENUS to FALSE
-
-    static const char *pExperimental = getenv ("AQUA_NATIVE_MENUS");
-
-    if ( pExperimental && !strcasecmp(pExperimental, "FALSE") )
-        return false;
-
-    // End of experimental code enable/disable part
-
     return true;
 }
 
@@ -811,7 +795,7 @@ void AquaSalMenu::statusLayout()
 
 bool AquaSalMenu::AddMenuBarButton( const SalMenuButtonItem& i_rNewItem )
 {
-    if( ! mbMenuBar || ! VisibleMenuBar() )
+    if( ! mbMenuBar  )
         return false;
 
     MenuBarButtonEntry* pEntry = findButtonItem( i_rNewItem.mnId );


More information about the Libreoffice-commits mailing list