diff options
author | Release Engineers <releng@openoffice.org> | 2009-04-14 17:47:15 +0000 |
---|---|---|
committer | Release Engineers <releng@openoffice.org> | 2009-04-14 17:47:15 +0000 |
commit | 7dce08951e498a6e0200f6bc68afff8017a665b4 (patch) | |
tree | fdb5d67b182b4ca8e4976aad9bd123e95458773f | |
parent | 32715d925a37abe02e4b6abb891cd91f2ade9de8 (diff) |
CWS-TOOLING: integrate CWS gtkmenuimages
2009-04-03 14:02:10 +0200 jsk r270485 : #i100820
2009-04-02 17:03:55 +0200 pl r270425 : CWS-TOOLING: rebase CWS gtkmenuimages to trunk@270033 (milestone: DEV300:m45)
2009-03-06 16:39:53 +0100 cmc r269021 : #i95318# pretty dialog up
2009-03-05 21:01:40 +0100 cmc r268944 : #i95318# pretty dialog up
2009-03-03 15:03:28 +0100 cmc r268731 : #i95318# pretty dialog up
2009-03-03 15:02:52 +0100 cmc r268730 : #i95318# pretty dialog up
2009-02-04 18:09:37 +0100 cmc r267397 : #i95318# follow system theme for defaults for icons on or off in menus
-rw-r--r-- | desktop/source/app/app.cxx | 19 | ||||
-rw-r--r-- | framework/source/classes/bmkmenu.cxx | 5 | ||||
-rw-r--r-- | framework/source/classes/menumanager.cxx | 6 | ||||
-rw-r--r-- | framework/source/uielement/controlmenucontroller.cxx | 5 | ||||
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 6 | ||||
-rw-r--r-- | framework/source/uielement/newmenucontroller.cxx | 10 | ||||
-rw-r--r-- | framework/source/uielement/toolbarsmenucontroller.cxx | 2 | ||||
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/Common.xcu | 5 | ||||
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Common.xcs | 7 | ||||
-rw-r--r-- | sfx2/source/menu/mnuitem.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/menu/virtmenu.cxx | 15 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/optgdlg.cxx | 29 | ||||
-rw-r--r-- | svx/source/dialog/optgdlg.hrc | 23 | ||||
-rw-r--r-- | svx/source/dialog/optgdlg.hxx | 3 | ||||
-rw-r--r-- | svx/source/dialog/optgdlg.src | 21 |
16 files changed, 102 insertions, 62 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 85ca479d6d..e9fad3f16d 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -123,6 +123,7 @@ #include <svtools/languageoptions.hxx> #include <svtools/internaloptions.hxx> #include <svtools/miscopt.hxx> +#include <svtools/menuoptions.hxx> #include <svtools/syslocaleoptions.hxx> #include <svtools/folderrestriction.hxx> #include <unotools/tempfile.hxx> @@ -1772,6 +1773,24 @@ 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); + sal_uInt16 nTabStyle = hStyleSettings.GetTabControlStyle(); nTabStyle &= ~STYLE_TABCONTROL_SINGLELINE; if( aAppearanceCfg.IsSingleLineTabCtrl() ) diff --git a/framework/source/classes/bmkmenu.cxx b/framework/source/classes/bmkmenu.cxx index b72ff7a7d1..0e6c269464 100644 --- a/framework/source/classes/bmkmenu.cxx +++ b/framework/source/classes/bmkmenu.cxx @@ -175,14 +175,15 @@ void BmkMenu::Initialize() aDynamicMenuEntries = SvtDynamicMenuOptions().GetMenu( E_NEWMENU ); else if ( m_nType == BmkMenu::BMK_WIZARDMENU ) aDynamicMenuEntries = SvtDynamicMenuOptions().GetMenu( E_WIZARDMENU ); - BOOL bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); + + const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); + BOOL bShowMenuImages = rSettings.GetUseImagesInMenus(); ::rtl::OUString aTitle; ::rtl::OUString aURL; ::rtl::OUString aTargetFrame; ::rtl::OUString aImageId; - const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark(); UINT32 i, nCount = aDynamicMenuEntries.getLength(); diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index 6dee73e526..88b573bbf0 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -160,7 +160,7 @@ MenuManager::MenuManager( const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); m_bWasHiContrast = rSettings.GetMenuColor().IsDark(); - m_bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); + m_bShowMenuImages = rSettings.GetUseImagesInMenus(); sal_Int32 nAddonsURLPrefixLength = ADDONSPOPUPMENU_URL_PREFIX.getLength(); ::std::vector< USHORT > aQueryLabelItemIdVector; @@ -1150,7 +1150,8 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu ) { // set/unset hiding disabled menu entries sal_Bool bDontHide = SvtMenuOptions().IsEntryHidingEnabled(); - sal_Bool bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); + const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); + sal_Bool bShowMenuImages = rSettings.GetUseImagesInMenus(); sal_uInt16 nFlag = pMenu->GetMenuFlags(); if ( bDontHide ) @@ -1181,7 +1182,6 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu ) UpdateSpecialWindowMenu( pMenu ); // Check if some modes have changed so we have to update our menu images - const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark(); if ( m_bWasHiContrast != bIsHiContrast || bShowMenuImages != m_bShowMenuImages ) diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index f2402899c1..84d4e217e1 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -229,7 +229,8 @@ ControlMenuController::ControlMenuController( const ::com::sun::star::uno::Refer { const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); m_bWasHiContrast = rSettings.GetMenuColor().IsDark(); - m_bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); + m_bShowMenuImages = rSettings.GetUseImagesInMenus(); + } ControlMenuController::~ControlMenuController() @@ -404,7 +405,7 @@ void SAL_CALL ControlMenuController::activate( const css::awt::MenuEvent& ) thro // Check if some modes have changed so we have to update our menu images const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark(); - sal_Bool bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); + sal_Bool bShowMenuImages = rSettings.GetUseImagesInMenus(); sal_Bool bUpdateImages = (( m_bWasHiContrast != bIsHiContrast ) || ( bShowMenuImages != m_bShowMenuImages )); if ( bUpdateImages ) diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 31893675c8..bde93eb4cf 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1060,7 +1060,8 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) { // set/unset hiding disabled menu entries sal_Bool bDontHide = SvtMenuOptions().IsEntryHidingEnabled(); - sal_Bool bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); + const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); + sal_Bool bShowMenuImages = rSettings.GetUseImagesInMenus(); sal_Bool bHasDisabledEntries = SvtCommandOptions().HasEntries( SvtCommandOptions::CMDOPTION_DISABLED ); ResetableGuard aGuard( m_aLock ); @@ -1084,7 +1085,6 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) UpdateSpecialWindowMenu( pMenu ); // Check if some modes have changed so we have to update our menu images - const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark(); sal_Int16 nSymbolsStyle = SvtMiscOptions().GetCurrentSymbolsStyle(); @@ -1592,7 +1592,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); m_bWasHiContrast = rSettings.GetMenuColor().IsDark(); - m_bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); + m_bShowMenuImages = rSettings.GetUseImagesInMenus(); m_bRetrieveImages = sal_False; sal_Int32 nAddonsURLPrefixLength = ADDONSPOPUPMENU_URL_PREFIX.getLength(); diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index 5b06fa59ca..aa371399c2 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -491,7 +491,7 @@ void SAL_CALL NewMenuController::activate( const css::awt::MenuEvent& ) throw (R if ( pPopupMenu ) { const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - sal_Bool bShowImages( SvtMenuOptions().IsMenuIconsEnabled() ); + sal_Bool bShowImages( rSettings.GetUseImagesInMenus() ); sal_Bool bHiContrast( rSettings.GetMenuColor().IsDark() ); PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu(); @@ -617,10 +617,12 @@ void SAL_CALL NewMenuController::initialize( const Sequence< Any >& aArguments ) m_xFrame = xFrame; m_aCommandURL = aCommandURL; m_bInitialized = sal_True; - m_bShowImages = SvtMenuOptions().IsMenuIconsEnabled(); - + const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - m_bHiContrast = rSettings.GetMenuColor().IsDark(); + + m_bShowImages = rSettings.GetUseImagesInMenus(); + m_bHiContrast = rSettings.GetMenuColor().IsDark(); + m_bNewMenu = m_aCommandURL.equalsAscii( ".uno:AddDirect" ); } } diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 4519b817c0..4f11003df0 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -213,7 +213,7 @@ void ToolbarsMenuController::addCommand( Image aImage; const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - if ( SvtMenuOptions().IsMenuIconsEnabled() ) + if ( rSettings.GetUseImagesInMenus() ) aImage = GetImageFromURL( m_xFrame, rCommandURL, FALSE, rSettings.GetMenuColor().IsDark() ); VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( rPopupMenu ); diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu index fb58d3f1e9..6e25dedba3 100644 --- a/officecfg/registry/data/org/openoffice/Office/Common.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu @@ -103,11 +103,6 @@ <value xml:lang="zh-TW">13</value> </prop> </node> - <node oor:name="Menu"> - <prop oor:name="ShowIconsInMenues" install:module="macosx"> - <value>false</value> - </prop> - </node> </node> <node oor:name="Help"> <node oor:name="StartCenter"> diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index 5379ddaea0..f71c6dcd7f 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -2746,6 +2746,13 @@ Dymamic border coloring means that when the mouse is hovered over a control, and </info> <value>true</value> </prop> + <prop oor:name="IsSystemIconsInMenus" oor:type="xs:boolean"> + <info> + <author>CMC</author> + <desc>Indicates whether icons in the office menus should shown/hidden by following the System theme.</desc> + </info> + <value>true</value> + </prop> <prop oor:name="ShowIconsInMenues" oor:type="xs:boolean"> <!-- OldPath: General/View --> <!-- UIHints: Tools Options - General View [Section] Options --> diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 6462f1dde2..1974c4e59a 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -452,7 +452,7 @@ SfxAppMenuControl_Impl::SfxAppMenuControl_Impl( const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); m_nSymbolsStyle = rSettings.GetSymbolsStyle(); m_bWasHiContrastMode = rSettings.GetMenuColor().IsDark(); - m_bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); + m_bShowMenuImages = rSettings.GetUseImagesInMenus(); Reference<com::sun::star::lang::XMultiServiceFactory> aXMultiServiceFactory(::comphelper::getProcessServiceFactory()); ::framework::MenuConfiguration aConf( aXMultiServiceFactory ); @@ -478,7 +478,7 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu ) const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); ULONG nSymbolsStyle = rSettings.GetSymbolsStyle(); BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark(); - BOOL bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); + BOOL bShowMenuImages = rSettings.GetUseImagesInMenus(); if (( nSymbolsStyle != m_nSymbolsStyle ) || ( bIsHiContrastMode != m_bWasHiContrastMode ) || diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index c0059805cf..5c42c0ef42 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -443,7 +443,7 @@ void SfxVirtualMenu::CreateFromSVMenu() pMnuCtrl->Bind( this, nSlotId, pSVMenu->GetItemText(nSlotId), pSVMenu->GetHelpText(nSlotId), *pBindings); - if ( aOptions.IsMenuIconsEnabled() ) + if ( Application::GetSettings().GetStyleSettings().GetUseImagesInMenus() ) { rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId )); @@ -540,7 +540,7 @@ void SfxVirtualMenu::CreateFromSVMenu() pMnuCtrl->Bind( this, nSlotId, pSVMenu->GetItemText(nSlotId), pSVMenu->GetHelpText(nSlotId), *pBindings); } - if ( aOptions.IsMenuIconsEnabled() ) + if ( Application::GetSettings().GetStyleSettings().GetUseImagesInMenus() ) { Image aImage; if ( bIsAddonPopupMenu || framework::AddonMenuManager::IsAddonMenuId( nSlotId )) @@ -611,10 +611,9 @@ IMPL_LINK( SfxVirtualMenu, Highlight, Menu *, pMenu ) IMPL_LINK( SfxVirtualMenu, SettingsChanged, void*, EMPTYARG ) { - SvtMenuOptions aOptions; USHORT nItemCount = pSVMenu->GetItemCount(); SfxViewFrame *pViewFrame = pBindings->GetDispatcher()->GetFrame(); - BOOL bIcons = aOptions.IsMenuIconsEnabled(); + BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus(); BOOL bIsHiContrastMode = IsHiContrastMode(); Reference<com::sun::star::frame::XFrame> xFrame( pViewFrame->GetFrame()->GetFrameInterface() ); @@ -681,8 +680,7 @@ IMPL_LINK( SfxVirtualMenu, SettingsChanged, void*, EMPTYARG ) void SfxVirtualMenu::UpdateImages() { - SvtMenuOptions aOptions; - BOOL bIcons = aOptions.IsMenuIconsEnabled(); + BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus(); if ( bIcons ) { @@ -731,10 +729,9 @@ void SfxVirtualMenu::UpdateImages( Menu* pMenu ) if ( !pMenu ) return; - SvtMenuOptions aOptions; framework::AddonsOptions aAddonOptions; - BOOL bIcons = aOptions.IsMenuIconsEnabled(); + BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus(); if ( bIcons ) { BOOL bIsHiContrastMode = IsHiContrastMode(); @@ -929,7 +926,7 @@ void SfxVirtualMenu::InsertAddOnsMenuItem( Menu* pMenu ) pMenu->InsertItem( SID_ADDONS, aAddonsTitle ); pMenu->SetPopupMenu( SID_ADDONS, pAddonMenu ); - if ( SvtMenuOptions().IsMenuIconsEnabled() ) + if ( Application::GetSettings().GetStyleSettings().GetUseImagesInMenus() ) { rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); aSlotURL += rtl::OUString::valueOf( sal_Int32( SID_ADDONS )); diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 7058e86e27..f0ebaf48aa 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -1511,7 +1511,7 @@ SfxAppToolBoxControl_Impl::SfxAppToolBoxControl_Impl( USHORT nSlotId, USHORT nId const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); m_nSymbolsStyle = rSettings.GetSymbolsStyle(); m_bWasHiContrastMode = rSettings.GetMenuColor().IsDark(); - m_bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); + m_bShowMenuImages = rSettings.GetUseImagesInMenus(); SetImage( String() ); } @@ -1787,7 +1787,7 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu ) const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); ULONG nSymbolsStyle = rSettings.GetSymbolsStyle(); BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark(); - BOOL bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); + BOOL bShowMenuImages = rSettings.GetUseImagesInMenus(); if (( nSymbolsStyle != m_nSymbolsStyle ) || ( bIsHiContrastMode != m_bWasHiContrastMode ) || diff --git a/svx/source/dialog/optgdlg.cxx b/svx/source/dialog/optgdlg.cxx index 5302bceb95..7b4bb2843e 100644 --- a/svx/source/dialog/optgdlg.cxx +++ b/svx/source/dialog/optgdlg.cxx @@ -678,7 +678,8 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) : aAAPointLimitUnits ( this, SVX_RES( FT_POINTLIMIT_UNIT )), #endif aMenuFL ( this, SVX_RES( FL_MENU ) ), - aMenuIconsCB ( this, SVX_RES( CB_MENU_ICONS )), + aMenuIconsFT ( this, SVX_RES( FT_MENU_ICONS )), + aMenuIconsLB ( this, SVX_RES( LB_MENU_ICONS )), aFontListsFL ( this, SVX_RES( FL_FONTLISTS) ), aFontShowCB ( this, SVX_RES( CB_FONT_SHOW ) ), aFontHistoryCB ( this, SVX_RES( CB_FONT_HISTORY ) ), @@ -733,8 +734,8 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) : // (in the resource, the coordinates are calculated for the AA options beeing present) Control* pMiscOptions[] = { - &aMenuFL, &aFontShowCB, - &aFontListsFL, &aFontHistoryCB, &aMenuIconsCB + &aMenuFL, &aMenuIconsFT, &aMenuIconsLB, + &aFontListsFL, &aFontShowCB, &aFontHistoryCB }; // temporaryly create the checkbox for the anti aliasing (we need to to determine it's pos) @@ -915,23 +916,18 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) } #endif - if ( bAppearanceChanged ) - { - pAppearanceCfg->Commit(); - pAppearanceCfg->SetApplicationDefaults ( GetpApp() ); - } - if ( aFontShowCB.IsChecked() != aFontShowCB.GetSavedValue() ) { aFontOpt.EnableFontWYSIWYG( aFontShowCB.IsChecked() ); bModified = TRUE; } - if(aMenuIconsCB.IsChecked() != aMenuIconsCB.GetSavedValue()) + if(aMenuIconsLB.GetSelectEntryPos() != aMenuIconsLB.GetSavedValue()) { - aMenuOpt.SetMenuIconsState( aMenuIconsCB.IsChecked() ); + aMenuOpt.SetMenuIconsState( aMenuIconsLB.GetSelectEntryPos() == 0 ? 2 : aMenuIconsLB.GetSelectEntryPos() - 1); bModified = TRUE; bMenuOptModified = TRUE; + bAppearanceChanged = TRUE; } if ( aFontHistoryCB.IsChecked() != aFontHistoryCB.GetSavedValue() ) @@ -984,7 +980,6 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) // Set changed settings to the application instance AllSettings aAllSettings = Application::GetSettings(); StyleSettings aStyleSettings = aAllSettings.GetStyleSettings(); - aStyleSettings.SetUseImagesInMenus( aMenuIconsCB.IsChecked() ); if( m_aSystemFont.IsEnabled() ) aStyleSettings.SetUseSystemUIFonts( m_aSystemFont.IsChecked() ); aAllSettings.SetStyleSettings(aStyleSettings); @@ -992,6 +987,12 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) Application::SetSettings(aAllSettings); } + if ( bAppearanceChanged ) + { + pAppearanceCfg->Commit(); + pAppearanceCfg->SetApplicationDefaults ( GetpApp() ); + } + return bModified; } @@ -1049,8 +1050,8 @@ void OfaViewTabPage::Reset( const SfxItemSet& ) SvtFontOptions aFontOpt; aFontShowCB.Check( aFontOpt.IsFontWYSIWYGEnabled() ); SvtMenuOptions aMenuOpt; - aMenuIconsCB.Check(aMenuOpt.IsMenuIconsEnabled()); - aMenuIconsCB.SaveValue(); + aMenuIconsLB.SelectEntryPos(aMenuOpt.GetMenuIconsState() == 2 ? 0 : aMenuOpt.GetMenuIconsState() + 1); + aMenuIconsLB.SaveValue(); aFontHistoryCB.Check( aFontOpt.IsFontHistoryEnabled() ); { // #i95644# HW accel (unified to disable mechanism) diff --git a/svx/source/dialog/optgdlg.hrc b/svx/source/dialog/optgdlg.hrc index 69e622eb39..79c0c24df0 100644 --- a/svx/source/dialog/optgdlg.hrc +++ b/svx/source/dialog/optgdlg.hrc @@ -72,8 +72,10 @@ #define ROW_NF_AA_POINTLIMIT (ROW_CB_FONTANTIALIASING+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE) #define ROW_FL_MENU (ROW_NF_AA_POINTLIMIT+RSC_CD_DROPDOWN_HEIGHT+RSC_SP_FLGR_SPACE_X) -#define ROW_CB_MENU_ICONS (ROW_FL_MENU + RSC_CD_FIXEDLINE_HEIGHT + ROWSPACE) -#define ROW_FL_FONTLISTS (ROW_CB_MENU_ICONS + RSC_CD_CHECKBOX_HEIGHT + RSC_SP_FLGR_SPACE_X) +#define ROW_FT_MENU_ICONS (ROW_FL_MENU + RSC_CD_FIXEDLINE_HEIGHT + ROWSPACE) +#define ROW_LB_MENU_ICONS (ROW_FT_MENU_ICONS + RSC_CD_FIXEDLINE_HEIGHT + ROWSPACE) + +#define ROW_FL_FONTLISTS (ROW_LB_MENU_ICONS + RSC_CD_CHECKBOX_HEIGHT + RSC_SP_FLGR_SPACE_X) #define ROW_CB_FONT_SHOW (ROW_FL_FONTLISTS + RSC_CD_FIXEDLINE_HEIGHT + ROWSPACE) #define ROW_CB_FONT_HISTORY (ROW_CB_FONT_SHOW + RSC_CD_CHECKBOX_HEIGHT + ROWSPACE) @@ -125,15 +127,16 @@ #define FT_MOUSEMIDDLE 33 #define LB_MOUSEMIDDLE 34 -#define CB_MENU_ICONS 40 -#define FL_MENU 41 -#define FL_FONTLISTS 42 +#define FT_MENU_ICONS 40 +#define LB_MENU_ICONS 41 +#define FL_MENU 42 +#define FL_FONTLISTS 43 -#define LB_ICONSIZE 53 -#define FT_ICONSIZESTYLE 54 -#define LB_ICONSTYLE 55 -#define CB_SYSTEM_FONT 56 -#define STR_ICONSIZE 57 +#define LB_ICONSIZE 54 +#define FT_ICONSIZESTYLE 55 +#define LB_ICONSTYLE 56 +#define CB_SYSTEM_FONT 57 +#define STR_ICONSIZE 58 #define CB_FONT_SHOW 60 #define CB_FONT_HISTORY 62 diff --git a/svx/source/dialog/optgdlg.hxx b/svx/source/dialog/optgdlg.hxx index 1f0f1b53ce..5023f33644 100644 --- a/svx/source/dialog/optgdlg.hxx +++ b/svx/source/dialog/optgdlg.hxx @@ -112,7 +112,8 @@ private: #endif FixedLine aMenuFL; - CheckBox aMenuIconsCB; + FixedText aMenuIconsFT; + ListBox aMenuIconsLB; FixedLine aFontListsFL; CheckBox aFontShowCB; diff --git a/svx/source/dialog/optgdlg.src b/svx/source/dialog/optgdlg.src index 966df6cb53..7f3ad69680 100644 --- a/svx/source/dialog/optgdlg.src +++ b/svx/source/dialog/optgdlg.src @@ -298,12 +298,25 @@ TabPage OFA_TP_VIEW Size = MAP_APPFONT ( 120 , 8 ) ; Text [ en-US ] = "Menu" ; }; - CheckBox CB_MENU_ICONS + FixedText FT_MENU_ICONS { + Pos = MAP_APPFONT ( 12 , ROW_FT_MENU_ICONS ) ; + Size = MAP_APPFONT ( 114 , 8 ) ; + Text [ en-US ] = "Icons in menus" ; + }; + ListBox LB_MENU_ICONS + { + Pos = MAP_APPFONT ( 12 , ROW_LB_MENU_ICONS ) ; + Size = MAP_APPFONT ( 114 , 60 ) ; + DropDown = TRUE ; + Border = TRUE ; TabStop = TRUE ; - Pos = MAP_APPFONT ( 12 , ROW_CB_MENU_ICONS ) ; - Size = MAP_APPFONT ( 118 , RSC_CD_CHECKBOX_HEIGHT ) ; - Text [ en-US ] = "Show icons in menus"; + StringList [ en-US ] = + { + < "Automatic" ; > ; + < "Hide" ; > ; + < "Show" ; > ; + }; }; FixedLine FL_FONTLISTS { |