[ooo-build-commit] .: 3 commits - desktop/source framework/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Oct 5 02:36:42 PDT 2010


 desktop/source/app/app.cxx                    |   17 +----------------
 framework/source/classes/menumanager.cxx      |   18 +++++++++++-------
 framework/source/uielement/menubarmanager.cxx |    8 +++++---
 3 files changed, 17 insertions(+), 26 deletions(-)

New commits:
commit 40a25c9771d659c5b2d79bb2dfe393f5fda9d730
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 4 21:00:57 2010 +0100

    be consistent wrt toolbarmanager with icons in menus

diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index b71ed38..68f654e 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -859,7 +859,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
             nFlag &= ~MENU_FLAG_HIDEDISABLEDENTRIES;
         else
             nFlag |= MENU_FLAG_HIDEDISABLEDENTRIES;
-        pMenu->SetMenuFlags( nFlag );
+        pMenu->SetMenuFlags( nFlag | MENU_FLAG_SHOWCHECKIMAGES );
 
         if ( m_bActive )
             return 0;
commit c81b663cd4318faf36a4ba69a068dd537181fdf6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 1 20:38:57 2010 +0100

    fixup show menus in icons

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index b394d47..71af718 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2117,23 +2117,8 @@ void Desktop::SystemSettingsChanging( AllSettings& rSettings, Window* )
     hMouseSettings.SetFollow( aAppearanceCfg.IsMenuMouseFollow() ? (nFollow|MOUSE_FOLLOW_MENU) : (nFollow&~MOUSE_FOLLOW_MENU));
     rSettings.SetMouseSettings(hMouseSettings);
 
-    BOOL bUseImagesInMenus = hStyleSettings.GetUseImagesInMenus();
-
     SvtMenuOptions aMenuOpt;
-    nGet = aMenuOpt.GetMenuIconsState();
-    switch ( nGet )
-    {
-        case 0:
-            bUseImagesInMenus = FALSE;
-            break;
-        case 1:
-            bUseImagesInMenus = TRUE;
-            break;
-        case 2:
-        default:
-            break;
-    }
-    hStyleSettings.SetUseImagesInMenus(bUseImagesInMenus);
+    hStyleSettings.SetUseImagesInMenus(aMenuOpt.GetMenuIconsState());
 
     sal_uInt16 nTabStyle = hStyleSettings.GetTabControlStyle();
     nTabStyle &= ~STYLE_TABCONTROL_SINGLELINE;
commit 41ac0a07277a59a456cf608cbbbdc385d9adcfa4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 1 20:27:44 2010 +0100

    use radio buttons for mutually excusive menu options

diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 825a4b2..e9a970b 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -169,11 +169,13 @@ MenuManager::MenuManager(
     {
         USHORT nItemId = FillItemCommand(aItemCommand,pMenu, i );
         bool bShowMenuImages( m_bShowMenuImages );
-        MenuItemBits nBits =  pMenu->GetItemBits( nItemId );
-        // overwrite the default?
-        if ( nBits )
-            bShowMenuImages = ( ( nBits & MIB_ICON ) == MIB_ICON );
 
+        // overwrite the show icons on menu option?
+        if (!bShowMenuImages)
+        {
+            MenuItemBits nBits = pMenu->GetItemBits( nItemId );
+            bShowMenuImages = ( ( nBits & MIB_ICON ) == MIB_ICON );
+        }
 
         PopupMenu* pPopupMenu = pMenu->GetPopupMenu( nItemId );
         if ( pPopupMenu )
@@ -1137,10 +1139,12 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame,Menu* _pMenu,sal_B
         if ( _pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR )
         {
             bool bTmpShowMenuImages( bShowMenuImages );
-            MenuItemBits nBits =  _pMenu->GetItemBits( nId );
-            // overwrite the default?
-            if ( nBits )
+            // overwrite the show icons on menu option?
+            if (!bTmpShowMenuImages)
+            {
+                MenuItemBits nBits =  _pMenu->GetItemBits( nId );
                 bTmpShowMenuImages = ( ( nBits & MIB_ICON ) == MIB_ICON );
+            }
 
             if ( bTmpShowMenuImages )
             {
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index b76ab6f..b71ed38 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1331,10 +1331,12 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
         Reference< XStatusListener > xStatusListener;
         PopupMenu* pPopup = pMenu->GetPopupMenu( nItemId );
         bool bItemShowMenuImages = m_bShowMenuImages;
-        MenuItemBits nBits =  pMenu->GetItemBits( nItemId );
         // overwrite the show icons on menu option?
-        if ( nBits )
+        if (!bItemShowMenuImages)
+        {
+            MenuItemBits nBits =  pMenu->GetItemBits( nItemId );
             bItemShowMenuImages = ( ( nBits & MIB_ICON ) == MIB_ICON );
+        }
         if ( pPopup )
         {
             // Retrieve module identifier from Help Command entry


More information about the ooo-build-commit mailing list