View | Details | Raw Unified | Return to issue 95318
Collapse All | Expand All

(-)openoffice.org.orig/officecfg/registry/schema/org/openoffice/Office/Common.xcs (+7 lines)
Lines 2657-2662 Link Here
2657
					</info>
2657
					</info>
2658
					<value>true</value>
2658
					<value>true</value>
2659
				</prop>
2659
				</prop>
2660
				<prop oor:name="IsSystemIconsInMenus" oor:type="xs:boolean">
2661
					<info>
2662
						<author>CMC</author>
2663
						<desc>Indicates whether icons in the office menus should shown/hidden by following the System theme.</desc>
2664
					</info>
2665
					<value>true</value>
2666
				</prop>
2660
				<prop oor:name="ShowIconsInMenues" oor:type="xs:boolean">
2667
				<prop oor:name="ShowIconsInMenues" oor:type="xs:boolean">
2661
					<!-- OldPath: General/View -->
2668
					<!-- OldPath: General/View -->
2662
					<!-- UIHints: Tools  Options - General  View  [Section] Options -->
2669
					<!-- UIHints: Tools  Options - General  View  [Section] Options -->
(-)openoffice.org.orig/svtools/inc/svtools/menuoptions.hxx (-2 / +2 lines)
Lines 122-132 Link Here
122
122
123
		sal_Bool IsEntryHidingEnabled() const;
123
		sal_Bool IsEntryHidingEnabled() const;
124
		sal_Bool IsFollowMouseEnabled() const;
124
		sal_Bool IsFollowMouseEnabled() const;
125
		sal_Bool IsMenuIconsEnabled() const;
125
		sal_Int16 GetMenuIconsState() const;
126
126
127
		void SetEntryHidingState( sal_Bool bState );
127
		void SetEntryHidingState( sal_Bool bState );
128
		void SetFollowMouseState( sal_Bool bState );
128
		void SetFollowMouseState( sal_Bool bState );
129
		void SetMenuIconsState( sal_Bool bState );
129
		void SetMenuIconsState( sal_Int16 bState );
130
130
131
	//-------------------------------------------------------------------------------------------------------------
131
	//-------------------------------------------------------------------------------------------------------------
132
	//	private methods
132
	//	private methods
(-)openoffice.org.orig/svtools/source/config/menuoptions.cxx (-18 / +48 lines)
Lines 43-48 Link Here
43
#include <tools/debug.hxx>
43
#include <tools/debug.hxx>
44
#include <com/sun/star/uno/Any.hxx>
44
#include <com/sun/star/uno/Any.hxx>
45
#include <com/sun/star/uno/Sequence.hxx>
45
#include <com/sun/star/uno/Sequence.hxx>
46
#include <vcl/svapp.hxx>
46
47
47
#include <rtl/logfile.hxx>
48
#include <rtl/logfile.hxx>
48
#include "itemholder1.hxx"
49
#include "itemholder1.hxx"
Lines 63-79 Link Here
63
#define	ROOTNODE_MENU							OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/View/Menu"	))
64
#define	ROOTNODE_MENU							OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/View/Menu"	))
64
#define	DEFAULT_DONTHIDEDISABLEDENTRIES			sal_False
65
#define	DEFAULT_DONTHIDEDISABLEDENTRIES			sal_False
65
#define	DEFAULT_FOLLOWMOUSE						sal_True
66
#define	DEFAULT_FOLLOWMOUSE						sal_True
66
#define	DEFAULT_MENUICONS						sal_True
67
#define	DEFAULT_MENUICONS						2
67
68
68
#define	PROPERTYNAME_DONTHIDEDISABLEDENTRIES	OUString(RTL_CONSTASCII_USTRINGPARAM("DontHideDisabledEntry"	))
69
#define	PROPERTYNAME_DONTHIDEDISABLEDENTRIES	OUString(RTL_CONSTASCII_USTRINGPARAM("DontHideDisabledEntry"	))
69
#define	PROPERTYNAME_FOLLOWMOUSE				OUString(RTL_CONSTASCII_USTRINGPARAM("FollowMouse"				))
70
#define	PROPERTYNAME_FOLLOWMOUSE				OUString(RTL_CONSTASCII_USTRINGPARAM("FollowMouse"				))
70
#define PROPERTYNAME_SHOWICONSINMENUES          OUString(RTL_CONSTASCII_USTRINGPARAM("ShowIconsInMenues"        ))
71
#define PROPERTYNAME_SHOWICONSINMENUES          OUString(RTL_CONSTASCII_USTRINGPARAM("ShowIconsInMenues"        ))
72
#define PROPERTYNAME_SYSTEMICONSINMENUES        OUString(RTL_CONSTASCII_USTRINGPARAM("IsSystemIconsInMenus"     ))
71
73
72
#define	PROPERTYHANDLE_DONTHIDEDISABLEDENTRIES	0
74
#define	PROPERTYHANDLE_DONTHIDEDISABLEDENTRIES	0
73
#define	PROPERTYHANDLE_FOLLOWMOUSE				1
75
#define	PROPERTYHANDLE_FOLLOWMOUSE				1
74
#define PROPERTYHANDLE_SHOWICONSINMENUES        2
76
#define PROPERTYHANDLE_SHOWICONSINMENUES        2
77
#define PROPERTYHANDLE_SYSTEMICONSINMENUES      3
75
78
76
#define PROPERTYCOUNT                           3
79
#define PROPERTYCOUNT                           4
77
80
78
#include <tools/link.hxx>
81
#include <tools/link.hxx>
79
#include <tools/list.hxx>
82
#include <tools/list.hxx>
Lines 93-99 Link Here
93
        LinkList    aList;
96
        LinkList    aList;
94
		sal_Bool	m_bDontHideDisabledEntries			;	/// cache "DontHideDisabledEntries" of Menu section
97
		sal_Bool	m_bDontHideDisabledEntries			;	/// cache "DontHideDisabledEntries" of Menu section
95
		sal_Bool	m_bFollowMouse						;	/// cache "FollowMouse" of Menu section
98
		sal_Bool	m_bFollowMouse						;	/// cache "FollowMouse" of Menu section
96
		sal_Bool	m_bMenuIcons						;	/// cache "MenuIcons" of Menu section
99
		sal_Int16	m_nMenuIcons						;	/// cache "MenuIcons" of Menu section
97
100
98
	//-------------------------------------------------------------------------------------------------------------
101
	//-------------------------------------------------------------------------------------------------------------
99
	//	public methods
102
	//	public methods
Lines 169-176 Link Here
169
		sal_Bool	IsFollowMouseEnabled() const
172
		sal_Bool	IsFollowMouseEnabled() const
170
					{ return m_bFollowMouse; }
173
					{ return m_bFollowMouse; }
171
174
172
		sal_Bool	IsMenuIconsEnabled() const
175
		sal_Int16	GetMenuIconsState() const
173
					{ return m_bMenuIcons; }
176
					{ return m_nMenuIcons; }
174
177
175
		void		SetEntryHidingState	( sal_Bool bState )
178
		void		SetEntryHidingState	( sal_Bool bState )
176
                    {
179
                    {
Lines 190-198 Link Here
190
						Commit();
193
						Commit();
191
                    }
194
                    }
192
195
193
		void		SetMenuIconsState ( sal_Bool bState	)
196
		void		SetMenuIconsState ( sal_Int16 bState	)
194
                    {
197
                    {
195
                        m_bMenuIcons = bState;
198
                        m_nMenuIcons = bState;
196
                        SetModified();
199
                        SetModified();
197
                        for ( USHORT n=0; n<aList.Count(); n++ )
200
                        for ( USHORT n=0; n<aList.Count(); n++ )
198
                            aList.GetObject(n)->Call( this );
201
                            aList.GetObject(n)->Call( this );
Lines 234-240 Link Here
234
	// Init member then.
237
	// Init member then.
235
	,	m_bDontHideDisabledEntries	( DEFAULT_DONTHIDEDISABLEDENTRIES	)
238
	,	m_bDontHideDisabledEntries	( DEFAULT_DONTHIDEDISABLEDENTRIES	)
236
	,	m_bFollowMouse				( DEFAULT_FOLLOWMOUSE				)
239
	,	m_bFollowMouse				( DEFAULT_FOLLOWMOUSE				)
237
	,   m_bMenuIcons				( DEFAULT_MENUICONS 				)
240
	,   m_nMenuIcons				( DEFAULT_MENUICONS 				)
238
{
241
{
239
	// Use our static list of configuration keys to get his values.
242
	// Use our static list of configuration keys to get his values.
240
	Sequence< OUString >	seqNames	= impl_GetPropertyNames();
243
	Sequence< OUString >	seqNames	= impl_GetPropertyNames();
Lines 245-250 Link Here
245
	// Follow assignment use order of values in relation to our list of key names!
248
	// Follow assignment use order of values in relation to our list of key names!
246
	DBG_ASSERT( !(seqNames.getLength()!=seqValues.getLength()), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nI miss some values of configuration keys!\n" );
249
	DBG_ASSERT( !(seqNames.getLength()!=seqValues.getLength()), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nI miss some values of configuration keys!\n" );
247
250
251
    sal_Bool bMenuIcons = true;
252
    sal_Bool bSystemMenuIcons = true;
253
248
	// Copy values from list in right order to ouer internal member.
254
	// Copy values from list in right order to ouer internal member.
249
	sal_Int32 nPropertyCount	=	seqValues.getLength()	;
255
	sal_Int32 nPropertyCount	=	seqValues.getLength()	;
250
	sal_Int32 nProperty			=	0						;
256
	sal_Int32 nProperty			=	0						;
Lines 268-279 Link Here
268
															break;
274
															break;
269
            case PROPERTYHANDLE_SHOWICONSINMENUES       :   {
275
            case PROPERTYHANDLE_SHOWICONSINMENUES       :   {
270
                                                                DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\ShowIconsInMenues\"?" );
276
                                                                DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\ShowIconsInMenues\"?" );
271
                                                                seqValues[nProperty] >>= m_bMenuIcons;
277
                                                                seqValues[nProperty] >>= bMenuIcons;
278
															}
279
															break;
280
            case PROPERTYHANDLE_SYSTEMICONSINMENUES		:   {
281
                                                                DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\IsSystemIconsInMenus\"?" );
282
                                                                seqValues[nProperty] >>= bSystemMenuIcons;
272
															}
283
															}
273
															break;
284
															break;
274
        }
285
        }
275
	}
286
	}
276
287
288
	m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons;
289
277
	EnableNotification( seqNames );
290
	EnableNotification( seqNames );
278
}
291
}
279
292
Lines 303-308 Link Here
303
	// Safe impossible cases.
316
	// Safe impossible cases.
304
	// We need values from ALL notified configuration keys.
317
	// We need values from ALL notified configuration keys.
305
	DBG_ASSERT( !(seqPropertyNames.getLength()!=seqValues.getLength()), "SvtMenuOptions_Impl::Notify()\nI miss some values of configuration keys!\n" );
318
	DBG_ASSERT( !(seqPropertyNames.getLength()!=seqValues.getLength()), "SvtMenuOptions_Impl::Notify()\nI miss some values of configuration keys!\n" );
319
320
    sal_Bool bMenuIcons = true;
321
    sal_Bool bSystemMenuIcons = true;
322
306
	// Step over list of property names and get right value from coreesponding value list to set it on internal members!
323
	// Step over list of property names and get right value from coreesponding value list to set it on internal members!
307
	sal_Int32 nCount = seqPropertyNames.getLength();
324
	sal_Int32 nCount = seqPropertyNames.getLength();
308
	for( sal_Int32 nProperty=0; nProperty<nCount; ++nProperty )
325
	for( sal_Int32 nProperty=0; nProperty<nCount; ++nProperty )
Lines 312-333 Link Here
312
			DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::Notify()\nWho has changed the value type of \"Office.Common\\View\\Menu\\DontHideDisabledEntry\"?" );
329
			DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::Notify()\nWho has changed the value type of \"Office.Common\\View\\Menu\\DontHideDisabledEntry\"?" );
313
			seqValues[nProperty] >>= m_bDontHideDisabledEntries;
330
			seqValues[nProperty] >>= m_bDontHideDisabledEntries;
314
		}
331
		}
315
		else
332
		else if( seqPropertyNames[nProperty] == PROPERTYNAME_FOLLOWMOUSE )
316
		if( seqPropertyNames[nProperty] == PROPERTYNAME_FOLLOWMOUSE )
317
		{
333
		{
318
			DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::Notify()\nWho has changed the value type of \"Office.Common\\View\\Menu\\FollowMouse\"?" );
334
			DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::Notify()\nWho has changed the value type of \"Office.Common\\View\\Menu\\FollowMouse\"?" );
319
			seqValues[nProperty] >>= m_bFollowMouse;
335
			seqValues[nProperty] >>= m_bFollowMouse;
320
		}
336
		}
321
        if( seqPropertyNames[nProperty] == PROPERTYNAME_SHOWICONSINMENUES )
337
        else if( seqPropertyNames[nProperty] == PROPERTYNAME_SHOWICONSINMENUES )
322
		{
338
		{
323
            DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\ShowIconsInMenues\"?" );
339
            DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\ShowIconsInMenues\"?" );
324
            seqValues[nProperty] >>= m_bMenuIcons;
340
            seqValues[nProperty] >>= bMenuIcons;
325
        }
341
        }
342
        else if( seqPropertyNames[nProperty] == PROPERTYNAME_SYSTEMICONSINMENUES )
343
		{
344
            DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\IsSystemIconsInMenus\"?" );
345
            seqValues[nProperty] >>= bSystemMenuIcons;
346
        }
347
326
        #if OSL_DEBUG_LEVEL > 1
348
        #if OSL_DEBUG_LEVEL > 1
327
		else DBG_ASSERT( sal_False, "SvtMenuOptions_Impl::Notify()\nUnkown property detected ... I can't handle these!\n" );
349
		else DBG_ASSERT( sal_False, "SvtMenuOptions_Impl::Notify()\nUnkown property detected ... I can't handle these!\n" );
328
		#endif
350
		#endif
329
	}
351
	}
330
352
353
	m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons;
354
331
    for ( USHORT n=0; n<aList.Count(); n++ )
355
    for ( USHORT n=0; n<aList.Count(); n++ )
332
        aList.GetObject(n)->Call( this );
356
        aList.GetObject(n)->Call( this );
333
}
357
}
Lines 354-361 Link Here
354
                												seqValues[nProperty] <<= m_bFollowMouse;
378
                												seqValues[nProperty] <<= m_bFollowMouse;
355
															}
379
															}
356
                											break;
380
                											break;
381
			//Output cache of current setting as possibly modified by System Theme for older version
357
            case PROPERTYHANDLE_SHOWICONSINMENUES       :   {
382
            case PROPERTYHANDLE_SHOWICONSINMENUES       :   {
358
                                                                seqValues[nProperty] <<= m_bMenuIcons;
383
                                                                seqValues[nProperty] <<=(sal_Bool)(Application::GetSettings().GetStyleSettings().GetUseImagesInMenus());
384
															}
385
                											break;
386
            case PROPERTYHANDLE_SYSTEMICONSINMENUES		:   {
387
                                                                seqValues[nProperty] <<= (m_nMenuIcons == 2 ? sal_True : sal_False) ;
359
															}
388
															}
360
                											break;
389
                											break;
361
        }
390
        }
Lines 374-380 Link Here
374
	{
403
	{
375
		PROPERTYNAME_DONTHIDEDISABLEDENTRIES	,
404
		PROPERTYNAME_DONTHIDEDISABLEDENTRIES	,
376
		PROPERTYNAME_FOLLOWMOUSE				,
405
		PROPERTYNAME_FOLLOWMOUSE				,
377
        PROPERTYNAME_SHOWICONSINMENUES
406
        PROPERTYNAME_SHOWICONSINMENUES			,
407
        PROPERTYNAME_SYSTEMICONSINMENUES
378
	};
408
	};
379
	// Initialize return sequence with these list ...
409
	// Initialize return sequence with these list ...
380
	static const Sequence< OUString > seqPropertyNames( pProperties, PROPERTYCOUNT );
410
	static const Sequence< OUString > seqPropertyNames( pProperties, PROPERTYCOUNT );
Lines 483-498 Link Here
483
//*****************************************************************************************************************
513
//*****************************************************************************************************************
484
//	public method
514
//	public method
485
//*****************************************************************************************************************
515
//*****************************************************************************************************************
486
sal_Bool SvtMenuOptions::IsMenuIconsEnabled() const
516
sal_Int16 SvtMenuOptions::GetMenuIconsState() const
487
{
517
{
488
    MutexGuard aGuard( GetOwnStaticMutex() );
518
    MutexGuard aGuard( GetOwnStaticMutex() );
489
	return m_pDataContainer->IsMenuIconsEnabled();
519
	return m_pDataContainer->GetMenuIconsState();
490
}
520
}
491
521
492
//*****************************************************************************************************************
522
//*****************************************************************************************************************
493
//	public method
523
//	public method
494
//*****************************************************************************************************************
524
//*****************************************************************************************************************
495
void SvtMenuOptions::SetMenuIconsState( sal_Bool bState )
525
void SvtMenuOptions::SetMenuIconsState( sal_Int16 bState )
496
{
526
{
497
    MutexGuard aGuard( GetOwnStaticMutex() );
527
    MutexGuard aGuard( GetOwnStaticMutex() );
498
	m_pDataContainer->SetMenuIconsState( bState );
528
	m_pDataContainer->SetMenuIconsState( bState );
(-)openoffice.org.orig/svtools/source/uno/contextmenuhelper.cxx (-1 / +1 lines)
Lines 606-612 Link Here
606
    // Retrieve some settings necessary to display complete context
606
    // Retrieve some settings necessary to display complete context
607
    // menu correctly.
607
    // menu correctly.
608
    const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
608
    const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
609
	bool  bShowMenuImages( SvtMenuOptions().IsMenuIconsEnabled() );
609
	bool  bShowMenuImages( rSettings.GetUseImagesInMenus() );
610
	bool  bIsHiContrast( rSettings.GetMenuColor().IsDark() );
610
	bool  bIsHiContrast( rSettings.GetMenuColor().IsDark() );
611
	
611
	
612
    if ( pMenu )
612
    if ( pMenu )
(-)openoffice.org.orig/framework/source/classes/bmkmenu.cxx (-2 / +3 lines)
Lines 175-188 Link Here
175
		aDynamicMenuEntries = SvtDynamicMenuOptions().GetMenu( E_NEWMENU );
175
		aDynamicMenuEntries = SvtDynamicMenuOptions().GetMenu( E_NEWMENU );
176
	else if ( m_nType == BmkMenu::BMK_WIZARDMENU )
176
	else if ( m_nType == BmkMenu::BMK_WIZARDMENU )
177
		aDynamicMenuEntries = SvtDynamicMenuOptions().GetMenu( E_WIZARDMENU );
177
		aDynamicMenuEntries = SvtDynamicMenuOptions().GetMenu( E_WIZARDMENU );
178
	BOOL bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled();
178
179
	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
180
	BOOL bShowMenuImages = rSettings.GetUseImagesInMenus();
179
181
180
	::rtl::OUString aTitle;
182
	::rtl::OUString aTitle;
181
	::rtl::OUString aURL;
183
	::rtl::OUString aURL;
182
	::rtl::OUString aTargetFrame;
184
	::rtl::OUString aTargetFrame;
183
	::rtl::OUString aImageId;
185
	::rtl::OUString aImageId;
184
186
185
	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
186
	BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark();
187
	BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark();
187
188
188
	UINT32 i, nCount = aDynamicMenuEntries.getLength();
189
	UINT32 i, nCount = aDynamicMenuEntries.getLength();
(-)openoffice.org.orig/framework/source/classes/menumanager.cxx (-3 / +3 lines)
Lines 160-166 Link Here
160
160
161
	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
161
	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
162
	m_bWasHiContrast	= rSettings.GetMenuColor().IsDark();
162
	m_bWasHiContrast	= rSettings.GetMenuColor().IsDark();
163
	m_bShowMenuImages	= SvtMenuOptions().IsMenuIconsEnabled();
163
	m_bShowMenuImages	= rSettings.GetUseImagesInMenus();
164
164
165
	sal_Int32 nAddonsURLPrefixLength = ADDONSPOPUPMENU_URL_PREFIX.getLength();
165
	sal_Int32 nAddonsURLPrefixLength = ADDONSPOPUPMENU_URL_PREFIX.getLength();
166
	::std::vector< USHORT > aQueryLabelItemIdVector;
166
	::std::vector< USHORT > aQueryLabelItemIdVector;
Lines 1150-1156 Link Here
1150
	{
1150
	{
1151
		// set/unset hiding disabled menu entries
1151
		// set/unset hiding disabled menu entries
1152
		sal_Bool bDontHide			= SvtMenuOptions().IsEntryHidingEnabled();
1152
		sal_Bool bDontHide			= SvtMenuOptions().IsEntryHidingEnabled();
1153
		sal_Bool bShowMenuImages	= SvtMenuOptions().IsMenuIconsEnabled();
1153
		const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
1154
		sal_Bool bShowMenuImages	= rSettings.GetUseImagesInMenus();
1154
1155
1155
		sal_uInt16 nFlag = pMenu->GetMenuFlags();
1156
		sal_uInt16 nFlag = pMenu->GetMenuFlags();
1156
		if ( bDontHide )
1157
		if ( bDontHide )
Lines 1181-1187 Link Here
1181
			UpdateSpecialWindowMenu( pMenu );
1182
			UpdateSpecialWindowMenu( pMenu );
1182
1183
1183
		// Check if some modes have changed so we have to update our menu images
1184
		// Check if some modes have changed so we have to update our menu images
1184
		const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
1185
		sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark();
1185
		sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark();
1186
1186
1187
		if ( m_bWasHiContrast != bIsHiContrast || bShowMenuImages != m_bShowMenuImages )
1187
		if ( m_bWasHiContrast != bIsHiContrast || bShowMenuImages != m_bShowMenuImages )
(-)openoffice.org.orig/framework/source/uielement/controlmenucontroller.cxx (-2 / +3 lines)
Lines 229-235 Link Here
229
{
229
{
230
    const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
230
    const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
231
	m_bWasHiContrast    = rSettings.GetMenuColor().IsDark();
231
	m_bWasHiContrast    = rSettings.GetMenuColor().IsDark();
232
    m_bShowMenuImages   = SvtMenuOptions().IsMenuIconsEnabled();
232
    m_bShowMenuImages   = rSettings.GetUseImagesInMenus();
233
233
}
234
}
234
235
235
ControlMenuController::~ControlMenuController()
236
ControlMenuController::~ControlMenuController()
Lines 408-414 Link Here
408
		// Check if some modes have changed so we have to update our menu images
409
		// Check if some modes have changed so we have to update our menu images
409
		const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
410
		const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
410
		sal_Bool bIsHiContrast      = rSettings.GetMenuColor().IsDark();
411
		sal_Bool bIsHiContrast      = rSettings.GetMenuColor().IsDark();
411
        sal_Bool bShowMenuImages    = SvtMenuOptions().IsMenuIconsEnabled();
412
        sal_Bool bShowMenuImages    = rSettings.GetUseImagesInMenus();
412
        sal_Bool bUpdateImages      = (( m_bWasHiContrast != bIsHiContrast ) || ( bShowMenuImages != m_bShowMenuImages ));
413
        sal_Bool bUpdateImages      = (( m_bWasHiContrast != bIsHiContrast ) || ( bShowMenuImages != m_bShowMenuImages ));
413
414
414
        if ( bUpdateImages )
415
        if ( bUpdateImages )
(-)openoffice.org.orig/framework/source/uielement/menubarmanager.cxx (-3 / +3 lines)
Lines 1048-1054 Link Here
1048
	{
1048
	{
1049
		// set/unset hiding disabled menu entries
1049
		// set/unset hiding disabled menu entries
1050
		sal_Bool bDontHide			 = SvtMenuOptions().IsEntryHidingEnabled();
1050
		sal_Bool bDontHide			 = SvtMenuOptions().IsEntryHidingEnabled();
1051
		sal_Bool bShowMenuImages	 = SvtMenuOptions().IsMenuIconsEnabled();
1051
		const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
1052
		sal_Bool bShowMenuImages	 = rSettings.GetUseImagesInMenus();
1052
        sal_Bool bHasDisabledEntries = SvtCommandOptions().HasEntries( SvtCommandOptions::CMDOPTION_DISABLED );
1053
        sal_Bool bHasDisabledEntries = SvtCommandOptions().HasEntries( SvtCommandOptions::CMDOPTION_DISABLED );
1053
1054
1054
        ResetableGuard aGuard( m_aLock );
1055
        ResetableGuard aGuard( m_aLock );
Lines 1072-1078 Link Here
1072
            UpdateSpecialWindowMenu( pMenu );
1073
            UpdateSpecialWindowMenu( pMenu );
1073
1074
1074
		// Check if some modes have changed so we have to update our menu images
1075
		// Check if some modes have changed so we have to update our menu images
1075
		const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
1076
		sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark();
1076
		sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark();
1077
		sal_Int16 nSymbolsStyle = SvtMiscOptions().GetCurrentSymbolsStyle();
1077
		sal_Int16 nSymbolsStyle = SvtMiscOptions().GetCurrentSymbolsStyle();
1078
1078
Lines 1584-1590 Link Here
1584
1584
1585
	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
1585
	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
1586
	m_bWasHiContrast	= rSettings.GetMenuColor().IsDark();
1586
	m_bWasHiContrast	= rSettings.GetMenuColor().IsDark();
1587
	m_bShowMenuImages	= SvtMenuOptions().IsMenuIconsEnabled();
1587
	m_bShowMenuImages	= rSettings.GetUseImagesInMenus();
1588
    m_bRetrieveImages   = sal_False;
1588
    m_bRetrieveImages   = sal_False;
1589
1589
1590
	sal_Int32 nAddonsURLPrefixLength = ADDONSPOPUPMENU_URL_PREFIX.getLength();
1590
	sal_Int32 nAddonsURLPrefixLength = ADDONSPOPUPMENU_URL_PREFIX.getLength();
(-)openoffice.org.orig/framework/source/uielement/newmenucontroller.cxx (-4 / +6 lines)
Lines 489-495 Link Here
489
        if ( pPopupMenu )
489
        if ( pPopupMenu )
490
        {
490
        {
491
            const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
491
            const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
492
            sal_Bool bShowImages( SvtMenuOptions().IsMenuIconsEnabled() );
492
            sal_Bool bShowImages( rSettings.GetUseImagesInMenus() );
493
            sal_Bool bHiContrast( rSettings.GetMenuColor().IsDark() );
493
            sal_Bool bHiContrast( rSettings.GetMenuColor().IsDark() );
494
494
495
            PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu();
495
            PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu();
Lines 615-624 Link Here
615
            m_xFrame        = xFrame;
615
            m_xFrame        = xFrame;
616
            m_aCommandURL   = aCommandURL;
616
            m_aCommandURL   = aCommandURL;
617
            m_bInitialized  = sal_True;
617
            m_bInitialized  = sal_True;
618
            m_bShowImages   = SvtMenuOptions().IsMenuIconsEnabled();
618
619
	        
620
            const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
619
            const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
621
	        m_bHiContrast	= rSettings.GetMenuColor().IsDark();
620
621
            m_bShowImages   = rSettings.GetUseImagesInMenus();
622
	    m_bHiContrast   = rSettings.GetMenuColor().IsDark();
623
622
            m_bNewMenu      = m_aCommandURL.equalsAscii( ".uno:AddDirect" );
624
            m_bNewMenu      = m_aCommandURL.equalsAscii( ".uno:AddDirect" );
623
        }
625
        }
624
    }
626
    }
(-)openoffice.org.orig/framework/source/uielement/toolbarsmenucontroller.cxx (-1 / +1 lines)
Lines 213-219 Link Here
213
    Image                aImage;
213
    Image                aImage;
214
	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
214
	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
215
    
215
    
216
    if ( SvtMenuOptions().IsMenuIconsEnabled() )
216
    if ( rSettings.GetUseImagesInMenus() )
217
        aImage = GetImageFromURL( m_xFrame, rCommandURL, FALSE, rSettings.GetMenuColor().IsDark() );
217
        aImage = GetImageFromURL( m_xFrame, rCommandURL, FALSE, rSettings.GetMenuColor().IsDark() );
218
218
219
    VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( rPopupMenu );
219
    VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( rPopupMenu );
(-)openoffice.org.orig/sfx2/source/menu/mnuitem.cxx (-2 / +2 lines)
Lines 446-452 Link Here
446
	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
446
	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
447
    m_nSymbolsStyle         = rSettings.GetSymbolsStyle();
447
    m_nSymbolsStyle         = rSettings.GetSymbolsStyle();
448
    m_bWasHiContrastMode    = rSettings.GetMenuColor().IsDark();
448
    m_bWasHiContrastMode    = rSettings.GetMenuColor().IsDark();
449
	m_bShowMenuImages		= SvtMenuOptions().IsMenuIconsEnabled();
449
	m_bShowMenuImages		= rSettings.GetUseImagesInMenus();
450
450
451
    Reference<com::sun::star::lang::XMultiServiceFactory> aXMultiServiceFactory(::comphelper::getProcessServiceFactory());
451
    Reference<com::sun::star::lang::XMultiServiceFactory> aXMultiServiceFactory(::comphelper::getProcessServiceFactory());
452
    ::framework::MenuConfiguration aConf( aXMultiServiceFactory );
452
    ::framework::MenuConfiguration aConf( aXMultiServiceFactory );
Lines 472-478 Link Here
472
		const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
472
		const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
473
        ULONG nSymbolsStyle = rSettings.GetSymbolsStyle();
473
        ULONG nSymbolsStyle = rSettings.GetSymbolsStyle();
474
		BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark();
474
		BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark();
475
        BOOL bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled();
475
        BOOL bShowMenuImages = rSettings.GetUseImagesInMenus();
476
476
477
        if (( nSymbolsStyle != m_nSymbolsStyle ) ||
477
        if (( nSymbolsStyle != m_nSymbolsStyle ) ||
478
            ( bIsHiContrastMode != m_bWasHiContrastMode ) ||
478
            ( bIsHiContrastMode != m_bWasHiContrastMode ) ||
(-)openoffice.org.orig/sfx2/source/menu/virtmenu.cxx (-9 / +6 lines)
Lines 443-449 Link Here
443
				pMnuCtrl->Bind( this, nSlotId, pSVMenu->GetItemText(nSlotId),
443
				pMnuCtrl->Bind( this, nSlotId, pSVMenu->GetItemText(nSlotId),
444
								pSVMenu->GetHelpText(nSlotId), *pBindings);
444
								pSVMenu->GetHelpText(nSlotId), *pBindings);
445
445
446
                if (  aOptions.IsMenuIconsEnabled() )
446
                if (  Application::GetSettings().GetStyleSettings().GetUseImagesInMenus() )
447
                {
447
                {
448
                    rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
448
                    rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
449
                    aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId ));
449
                    aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId ));
Lines 540-546 Link Here
540
                        pMnuCtrl->Bind( this, nSlotId, pSVMenu->GetItemText(nSlotId), pSVMenu->GetHelpText(nSlotId), *pBindings);
540
                        pMnuCtrl->Bind( this, nSlotId, pSVMenu->GetItemText(nSlotId), pSVMenu->GetHelpText(nSlotId), *pBindings);
541
					}
541
					}
542
542
543
                    if ( aOptions.IsMenuIconsEnabled() )
543
                    if ( Application::GetSettings().GetStyleSettings().GetUseImagesInMenus() )
544
                    {
544
                    {
545
						Image aImage;
545
						Image aImage;
546
						if ( bIsAddonPopupMenu || framework::AddonMenuManager::IsAddonMenuId( nSlotId ))
546
						if ( bIsAddonPopupMenu || framework::AddonMenuManager::IsAddonMenuId( nSlotId ))
Lines 611-620 Link Here
611
611
612
IMPL_LINK( SfxVirtualMenu, SettingsChanged, void*, EMPTYARG )
612
IMPL_LINK( SfxVirtualMenu, SettingsChanged, void*, EMPTYARG )
613
{
613
{
614
	SvtMenuOptions aOptions;
615
    USHORT nItemCount = pSVMenu->GetItemCount();
614
    USHORT nItemCount = pSVMenu->GetItemCount();
616
    SfxViewFrame *pViewFrame = pBindings->GetDispatcher()->GetFrame();
615
    SfxViewFrame *pViewFrame = pBindings->GetDispatcher()->GetFrame();
617
    BOOL bIcons = aOptions.IsMenuIconsEnabled();
616
    BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
618
	BOOL bIsHiContrastMode = IsHiContrastMode();
617
	BOOL bIsHiContrastMode = IsHiContrastMode();
619
	Reference<com::sun::star::frame::XFrame> xFrame( pViewFrame->GetFrame()->GetFrameInterface() );
618
	Reference<com::sun::star::frame::XFrame> xFrame( pViewFrame->GetFrame()->GetFrameInterface() );
620
619
Lines 681-688 Link Here
681
680
682
void SfxVirtualMenu::UpdateImages()
681
void SfxVirtualMenu::UpdateImages()
683
{
682
{
684
	SvtMenuOptions aOptions;
683
    BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
685
    BOOL bIcons = aOptions.IsMenuIconsEnabled();
686
684
687
	if ( bIcons )
685
	if ( bIcons )
688
	{
686
	{
Lines 731-740 Link Here
731
	if ( !pMenu )
729
	if ( !pMenu )
732
		return;
730
		return;
733
731
734
	SvtMenuOptions				aOptions;
735
	framework::AddonsOptions	aAddonOptions;
732
	framework::AddonsOptions	aAddonOptions;
736
733
737
    BOOL bIcons = aOptions.IsMenuIconsEnabled();
734
    BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
738
	if ( bIcons )
735
	if ( bIcons )
739
	{
736
	{
740
		BOOL			bIsHiContrastMode	= IsHiContrastMode();
737
		BOOL			bIsHiContrastMode	= IsHiContrastMode();
Lines 929-935 Link Here
929
	    pMenu->InsertItem( SID_ADDONS, aAddonsTitle );
926
	    pMenu->InsertItem( SID_ADDONS, aAddonsTitle );
930
        pMenu->SetPopupMenu( SID_ADDONS, pAddonMenu );
927
        pMenu->SetPopupMenu( SID_ADDONS, pAddonMenu );
931
928
932
	    if ( SvtMenuOptions().IsMenuIconsEnabled() )
929
	    if ( Application::GetSettings().GetStyleSettings().GetUseImagesInMenus() )
933
	    {
930
	    {
934
               rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
931
               rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
935
               aSlotURL += rtl::OUString::valueOf( sal_Int32( SID_ADDONS ));
932
               aSlotURL += rtl::OUString::valueOf( sal_Int32( SID_ADDONS ));
(-)openoffice.org.orig/sfx2/source/toolbox/tbxitem.cxx (-2 / +2 lines)
Lines 1497-1503 Link Here
1497
	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
1497
	const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
1498
    m_nSymbolsStyle         = rSettings.GetSymbolsStyle();
1498
    m_nSymbolsStyle         = rSettings.GetSymbolsStyle();
1499
	m_bWasHiContrastMode	= rSettings.GetMenuColor().IsDark();
1499
	m_bWasHiContrastMode	= rSettings.GetMenuColor().IsDark();
1500
	m_bShowMenuImages		= SvtMenuOptions().IsMenuIconsEnabled();
1500
	m_bShowMenuImages		= rSettings.GetUseImagesInMenus();
1501
1501
1502
    SetImage( String() );
1502
    SetImage( String() );
1503
}
1503
}
Lines 1773-1779 Link Here
1773
		const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
1773
		const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
1774
        ULONG nSymbolsStyle     = rSettings.GetSymbolsStyle();
1774
        ULONG nSymbolsStyle     = rSettings.GetSymbolsStyle();
1775
        BOOL bIsHiContrastMode  = rSettings.GetMenuColor().IsDark();
1775
        BOOL bIsHiContrastMode  = rSettings.GetMenuColor().IsDark();
1776
		BOOL bShowMenuImages	= SvtMenuOptions().IsMenuIconsEnabled();
1776
		BOOL bShowMenuImages	= rSettings.GetUseImagesInMenus();
1777
1777
1778
        if (( nSymbolsStyle != m_nSymbolsStyle ) ||
1778
        if (( nSymbolsStyle != m_nSymbolsStyle ) ||
1779
            ( bIsHiContrastMode != m_bWasHiContrastMode ) ||
1779
            ( bIsHiContrastMode != m_bWasHiContrastMode ) ||
(-)openoffice.org.orig/svx/source/dialog/optgdlg.cxx (-13 / +13 lines)
Lines 691-697 Link Here
691
	aAAPointLimitUnits	( this, SVX_RES( FT_POINTLIMIT_UNIT )),
691
	aAAPointLimitUnits	( this, SVX_RES( FT_POINTLIMIT_UNIT )),
692
#endif
692
#endif
693
    aMenuFL             ( this, SVX_RES( FL_MENU ) ),
693
    aMenuFL             ( this, SVX_RES( FL_MENU ) ),
694
    aMenuIconsCB        ( this, SVX_RES( CB_MENU_ICONS )),
694
    aMenuIconsLB        ( this, SVX_RES( LB_MENU_ICONS )),
695
    aFontListsFL        ( this, SVX_RES( FL_FONTLISTS) ),
695
    aFontListsFL        ( this, SVX_RES( FL_FONTLISTS) ),
696
    aFontShowCB         ( this, SVX_RES( CB_FONT_SHOW ) ),
696
    aFontShowCB         ( this, SVX_RES( CB_FONT_SHOW ) ),
697
    aFontHistoryCB      ( this, SVX_RES( CB_FONT_HISTORY ) ),
697
    aFontHistoryCB      ( this, SVX_RES( CB_FONT_HISTORY ) ),
Lines 759-765 Link Here
759
	Control* pMiscOptions[] =
759
	Control* pMiscOptions[] =
760
	{
760
	{
761
        &aMenuFL, &aFontShowCB,
761
        &aMenuFL, &aFontShowCB,
762
        &aFontListsFL, &aFontHistoryCB, &aMenuIconsCB
762
        &aFontListsFL, &aFontHistoryCB, &aMenuIconsLB
763
	};
763
	};
764
764
765
	// temporaryly create the checkbox for the anti aliasing (we need to to determine it's pos)
765
	// temporaryly create the checkbox for the anti aliasing (we need to to determine it's pos)
Lines 939-961 Link Here
939
    }
939
    }
940
#endif
940
#endif
941
941
942
    if ( bAppearanceChanged )
943
    {
944
        pAppearanceCfg->Commit();
945
        pAppearanceCfg->SetApplicationDefaults ( GetpApp() );
946
    }
947
948
    if ( aFontShowCB.IsChecked() != aFontShowCB.GetSavedValue() )
942
    if ( aFontShowCB.IsChecked() != aFontShowCB.GetSavedValue() )
949
	{
943
	{
950
		aFontOpt.EnableFontWYSIWYG( aFontShowCB.IsChecked() );
944
		aFontOpt.EnableFontWYSIWYG( aFontShowCB.IsChecked() );
951
		bModified = TRUE;
945
		bModified = TRUE;
952
	}
946
	}
953
947
954
    if(aMenuIconsCB.IsChecked() != aMenuIconsCB.GetSavedValue())
948
    if(aMenuIconsLB.GetSelectEntryPos() != aMenuIconsLB.GetSavedValue())
955
    {
949
    {
956
        aMenuOpt.SetMenuIconsState( aMenuIconsCB.IsChecked() );
950
        aMenuOpt.SetMenuIconsState( aMenuIconsLB.GetSelectEntryPos() == 0 ? 2 : aMenuIconsLB.GetSelectEntryPos() - 1);
957
        bModified = TRUE;
951
        bModified = TRUE;
958
        bMenuOptModified = TRUE;
952
        bMenuOptModified = TRUE;
953
    	bAppearanceChanged = TRUE;
959
	}
954
	}
960
955
961
	if ( aFontHistoryCB.IsChecked() != aFontHistoryCB.GetSavedValue() )
956
	if ( aFontHistoryCB.IsChecked() != aFontHistoryCB.GetSavedValue() )
Lines 1014-1020 Link Here
1014
		// Set changed settings to the application instance
1009
		// Set changed settings to the application instance
1015
		AllSettings aAllSettings = Application::GetSettings();
1010
		AllSettings aAllSettings = Application::GetSettings();
1016
        StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
1011
        StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
1017
        aStyleSettings.SetUseImagesInMenus( aMenuIconsCB.IsChecked() );
1018
        if( m_aSystemFont.IsEnabled() )
1012
        if( m_aSystemFont.IsEnabled() )
1019
            aStyleSettings.SetUseSystemUIFonts( m_aSystemFont.IsChecked() );
1013
            aStyleSettings.SetUseSystemUIFonts( m_aSystemFont.IsChecked() );
1020
        aAllSettings.SetStyleSettings(aStyleSettings);
1014
        aAllSettings.SetStyleSettings(aStyleSettings);
Lines 1022-1027 Link Here
1022
		Application::SetSettings(aAllSettings);
1016
		Application::SetSettings(aAllSettings);
1023
    }
1017
    }
1024
1018
1019
    if ( bAppearanceChanged )
1020
    {
1021
        pAppearanceCfg->Commit();
1022
        pAppearanceCfg->SetApplicationDefaults ( GetpApp() );
1023
    }
1024
1025
    return bModified;
1025
    return bModified;
1026
}
1026
}
1027
1027
Lines 1086-1093 Link Here
1086
    SvtFontOptions aFontOpt;
1086
    SvtFontOptions aFontOpt;
1087
	aFontShowCB.Check( aFontOpt.IsFontWYSIWYGEnabled() );
1087
	aFontShowCB.Check( aFontOpt.IsFontWYSIWYGEnabled() );
1088
    SvtMenuOptions aMenuOpt;
1088
    SvtMenuOptions aMenuOpt;
1089
    aMenuIconsCB.Check(aMenuOpt.IsMenuIconsEnabled());
1089
    aMenuIconsLB.SelectEntryPos(aMenuOpt.GetMenuIconsState() == 2 ? 0 : aMenuOpt.GetMenuIconsState() + 1);
1090
    aMenuIconsCB.SaveValue();
1090
    aMenuIconsLB.SaveValue();
1091
1091
1092
    aFontHistoryCB.Check( aFontOpt.IsFontHistoryEnabled() );
1092
    aFontHistoryCB.Check( aFontOpt.IsFontHistoryEnabled() );
1093
    if ( pCanvasSettings && pCanvasSettings->IsHardwareAccelerationAvailable() )
1093
    if ( pCanvasSettings && pCanvasSettings->IsHardwareAccelerationAvailable() )
(-)openoffice.org.orig/svx/source/dialog/optgdlg.hrc (-3 / +3 lines)
Lines 72-79 Link Here
72
#define ROW_NF_AA_POINTLIMIT	(ROW_CB_FONTANTIALIASING+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE)
72
#define ROW_NF_AA_POINTLIMIT	(ROW_CB_FONTANTIALIASING+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE)
73
73
74
#define ROW_FL_MENU             (ROW_NF_AA_POINTLIMIT+RSC_CD_DROPDOWN_HEIGHT+RSC_SP_FLGR_SPACE_X)
74
#define ROW_FL_MENU             (ROW_NF_AA_POINTLIMIT+RSC_CD_DROPDOWN_HEIGHT+RSC_SP_FLGR_SPACE_X)
75
#define ROW_CB_MENU_ICONS       (ROW_FL_MENU + RSC_CD_FIXEDLINE_HEIGHT + ROWSPACE)
75
#define ROW_LB_MENU_ICONS       (ROW_FL_MENU + RSC_CD_FIXEDLINE_HEIGHT + ROWSPACE)
76
#define ROW_FL_FONTLISTS        (ROW_CB_MENU_ICONS + RSC_CD_CHECKBOX_HEIGHT + RSC_SP_FLGR_SPACE_X)
76
#define ROW_FL_FONTLISTS        (ROW_LB_MENU_ICONS + RSC_CD_CHECKBOX_HEIGHT + RSC_SP_FLGR_SPACE_X)
77
#define ROW_CB_FONT_SHOW        (ROW_FL_FONTLISTS + RSC_CD_FIXEDLINE_HEIGHT + ROWSPACE)
77
#define ROW_CB_FONT_SHOW        (ROW_FL_FONTLISTS + RSC_CD_FIXEDLINE_HEIGHT + ROWSPACE)
78
#define ROW_CB_FONT_HISTORY     (ROW_CB_FONT_SHOW + RSC_CD_CHECKBOX_HEIGHT + ROWSPACE)
78
#define ROW_CB_FONT_HISTORY     (ROW_CB_FONT_SHOW + RSC_CD_CHECKBOX_HEIGHT + ROWSPACE)
79
79
Lines 133-139 Link Here
133
#define FT_MOUSEMIDDLE				33
133
#define FT_MOUSEMIDDLE				33
134
#define LB_MOUSEMIDDLE				34
134
#define LB_MOUSEMIDDLE				34
135
135
136
#define CB_MENU_ICONS				40
136
#define LB_MENU_ICONS				40
137
#define FL_MENU						41
137
#define FL_MENU						41
138
#define FL_FONTLISTS				42
138
#define FL_FONTLISTS				42
139
139
(-)openoffice.org.orig/svx/source/dialog/optgdlg.hxx (-1 / +1 lines)
Lines 110-116 Link Here
110
#endif
110
#endif
111
111
112
    FixedLine       aMenuFL;
112
    FixedLine       aMenuFL;
113
    CheckBox        aMenuIconsCB;
113
    ListBox         aMenuIconsLB;
114
114
115
    FixedLine       aFontListsFL;
115
    FixedLine       aFontListsFL;
116
	CheckBox		aFontShowCB;
116
	CheckBox		aFontShowCB;
(-)openoffice.org.orig/svx/source/dialog/optgdlg.src (-4 / +11 lines)
Lines 298-309 Link Here
298
        Size = MAP_APPFONT ( 120 , 8 ) ;
298
        Size = MAP_APPFONT ( 120 , 8 ) ;
299
        Text [ en-US ] = "Menu" ;
299
        Text [ en-US ] = "Menu" ;
300
    };
300
    };
301
    CheckBox CB_MENU_ICONS
301
    ListBox LB_MENU_ICONS
302
    {
302
    {
303
        Pos = MAP_APPFONT ( 12 , ROW_LB_MENU_ICONS ) ;
304
        Size = MAP_APPFONT ( 45 , 60 ) ;
305
        DropDown = TRUE ;
306
        Border = TRUE ;
303
        TabStop = TRUE ;
307
        TabStop = TRUE ;
304
        Pos = MAP_APPFONT ( 12 , ROW_CB_MENU_ICONS ) ;
308
        StringList [ en-US ] =
305
        Size = MAP_APPFONT ( 118 , RSC_CD_CHECKBOX_HEIGHT ) ;
309
        {
306
        Text [ en-US ] = "Show icons in menus";
310
            < "Automatic" ; > ;
311
            < "Hide Icons" ; > ;
312
            < "Show Icons" ; > ;
313
        };
307
    };
314
    };
308
    FixedLine FL_FONTLISTS
315
    FixedLine FL_FONTLISTS
309
    {
316
    {
(-)openoffice.org.orig/desktop/source/app/app.cxx (-1 / +23 lines)
Lines 125-130 Link Here
125
#include <svtools/languageoptions.hxx>
125
#include <svtools/languageoptions.hxx>
126
#include <svtools/internaloptions.hxx>
126
#include <svtools/internaloptions.hxx>
127
#include <svtools/miscopt.hxx>
127
#include <svtools/miscopt.hxx>
128
#include <svtools/menuoptions.hxx>
128
#include <svtools/syslocaleoptions.hxx>
129
#include <svtools/syslocaleoptions.hxx>
129
#include <svtools/folderrestriction.hxx>
130
#include <svtools/folderrestriction.hxx>
130
#include <unotools/tempfile.hxx>
131
#include <unotools/tempfile.hxx>
Lines 1465-1471 Link Here
1465
    SvtFontSubstConfig().Apply();
1412
    SvtFontSubstConfig().Apply();
1466
1413
1467
    SvtTabAppearanceCfg aAppearanceCfg;
1414
    SvtTabAppearanceCfg aAppearanceCfg;
1468
	//aAppearanceCfg.SetInitialized();
1415
	aAppearanceCfg.SetInitialized();
1469
	aAppearanceCfg.SetApplicationDefaults( this );
1416
	aAppearanceCfg.SetApplicationDefaults( this );
1470
	SvtAccessibilityOptions aOptions;
1417
	SvtAccessibilityOptions aOptions;
1471
	aOptions.SetVCLSettings();
1418
	aOptions.SetVCLSettings();
Lines 1725-1730 Link Here
1725
    hMouseSettings.SetFollow( aAppearanceCfg.IsMenuMouseFollow() ? (nFollow|MOUSE_FOLLOW_MENU) : (nFollow&~MOUSE_FOLLOW_MENU));
1677
    hMouseSettings.SetFollow( aAppearanceCfg.IsMenuMouseFollow() ? (nFollow|MOUSE_FOLLOW_MENU) : (nFollow&~MOUSE_FOLLOW_MENU));
1726
    rSettings.SetMouseSettings(hMouseSettings);
1678
    rSettings.SetMouseSettings(hMouseSettings);
1727
1679
1680
    BOOL bUseImagesInMenus = hStyleSettings.GetUseImagesInMenus();
1681
1682
    SvtMenuOptions aMenuOpt;
1683
    fprintf(stderr, "Desktop::SystemSettingsChanging state is %d, settings are %d\n", aMenuOpt.GetMenuIconsState(), bUseImagesInMenus);
1684
    nGet = aMenuOpt.GetMenuIconsState();
1685
	switch ( nGet )
1686
	{
1687
	case 0:
1688
		bUseImagesInMenus = FALSE;
1689
		break;
1690
	case 1:
1691
		bUseImagesInMenus = TRUE;
1692
		break;
1693
	case 2:
1694
	default:
1695
		break;
1696
	}
1697
    hStyleSettings.SetUseImagesInMenus(bUseImagesInMenus);
1698
1699
	fprintf(stderr, "Desktop::SystemSettingsChanging state is %d, settings are now %d\n", aMenuOpt.GetMenuIconsState(), bUseImagesInMenus);
1700
1728
	sal_uInt16 nTabStyle = hStyleSettings.GetTabControlStyle();
1701
	sal_uInt16 nTabStyle = hStyleSettings.GetTabControlStyle();
1729
    nTabStyle &= ~STYLE_TABCONTROL_SINGLELINE;
1702
    nTabStyle &= ~STYLE_TABCONTROL_SINGLELINE;
1730
    if( aAppearanceCfg.IsSingleLineTabCtrl() )
1703
    if( aAppearanceCfg.IsSingleLineTabCtrl() )
(-)openoffice.org.orig/vcl/source/window/window.cxx (+6 lines)
Lines 470-475 Link Here
470
        }
474
        }
471
    }
475
    }
472
476
477
#if 0
473
	// Detect if images in menus are allowed or not
478
	// Detect if images in menus are allowed or not
474
    {
479
    {
475
        sal_Bool bTmp = sal_False, bUseImagesInMenus = sal_True;
480
        sal_Bool bTmp = sal_False, bUseImagesInMenus = sal_True;
Lines 480-492 Link Here
480
        {
485
        {
481
            ::com::sun::star::uno::Any aValue = aNode.getNodeValue( OUString::createFromAscii( "ShowIconsInMenues" ) );
486
            ::com::sun::star::uno::Any aValue = aNode.getNodeValue( OUString::createFromAscii( "ShowIconsInMenues" ) );
482
            if( aValue >>= bTmp )
487
            if( aValue >>= bTmp )
488
		{
483
                bUseImagesInMenus = bTmp;
489
                bUseImagesInMenus = bTmp;
490
		fprintf(stderr, "bUseImagesInMenus set to %d\n", bUseImagesInMenus);
491
		}
484
        }
492
        }
485
493
486
        aStyleSettings = rSettings.GetStyleSettings();
494
        aStyleSettings = rSettings.GetStyleSettings();
495
	fprintf(stderr, "using %d\n", bUseImagesInMenus);
487
        aStyleSettings.SetUseImagesInMenus( bUseImagesInMenus );
496
        aStyleSettings.SetUseImagesInMenus( bUseImagesInMenus );
488
        rSettings.SetStyleSettings( aStyleSettings );
497
        rSettings.SetStyleSettings( aStyleSettings );
489
    }
498
    }
499
#endif 
490
500
491
#ifdef DBG_UTIL
501
#ifdef DBG_UTIL
492
    // Evt. AppFont auf Fett schalten, damit man feststellen kann,
502
    // Evt. AppFont auf Fett schalten, damit man feststellen kann,
(-)openoffice.org.orig/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx (+14 lines)
Lines 96-101 Link Here
96
    GtkWidget *  gMenuItemMenuWidget;
97
    GtkWidget *  gMenuItemMenuWidget;
97
    GtkWidget *  gMenuItemCheckMenuWidget;
98
    GtkWidget *  gMenuItemCheckMenuWidget;
98
    GtkWidget *  gMenuItemRadioMenuWidget;
99
    GtkWidget *  gMenuItemRadioMenuWidget;
100
    GtkWidget *  gImageMenuItem;
99
    GtkWidget *  gTooltipPopup;
101
    GtkWidget *  gTooltipPopup;
100
    GtkWidget *  gProgressBar;
102
    GtkWidget *  gProgressBar;
101
103
Lines 130-135 Link Here
130
        gMenuItemMenuWidget( NULL ),
132
        gMenuItemMenuWidget( NULL ),
131
        gMenuItemCheckMenuWidget( NULL ),
133
        gMenuItemCheckMenuWidget( NULL ),
132
        gMenuItemRadioMenuWidget( NULL ),
134
        gMenuItemRadioMenuWidget( NULL ),
135
	gImageMenuItem( NULL ),
133
        gTooltipPopup( NULL ),
136
        gTooltipPopup( NULL ),
134
        gProgressBar( NULL ),
137
        gProgressBar( NULL ),
135
        gNWPixmapCacheList( NULL ),
138
        gNWPixmapCacheList( NULL ),
Lines 3326-3331 Link Here
3326
    else
3340
    else
3327
        aStyleSet.SetCursorBlinkTime( STYLE_CURSOR_NOBLINKTIME );
3341
        aStyleSet.SetCursorBlinkTime( STYLE_CURSOR_NOBLINKTIME );
3328
3342
3343
    gboolean showmenuicons = true;
3344
    pSettings = gtk_widget_get_settings( gWidgetData[m_nScreen].gImageMenuItem );
3345
    g_object_get( pSettings, "gtk-menu-images", &showmenuicons, (char *)NULL );
3346
    fprintf(stderr, "Theme says: images in menus is %d\n", showmenuicons);
3347
    aStyleSet.SetUseImagesInMenus( showmenuicons );
3348
3329
    // set scrollbar settings
3349
    // set scrollbar settings
3330
    gint slider_width = 14;
3350
    gint slider_width = 14;
3331
    gint trough_border = 1;
3351
    gint trough_border = 1;
Lines 3765-3774 Link Here
3765
        gWidgetData[nScreen].gMenuItemMenuWidget      = gtk_menu_item_new_with_label( "b" );
3790
        gWidgetData[nScreen].gMenuItemMenuWidget      = gtk_menu_item_new_with_label( "b" );
3766
        gWidgetData[nScreen].gMenuItemCheckMenuWidget = gtk_check_menu_item_new_with_label( "b" );
3791
        gWidgetData[nScreen].gMenuItemCheckMenuWidget = gtk_check_menu_item_new_with_label( "b" );
3767
        gWidgetData[nScreen].gMenuItemRadioMenuWidget = gtk_radio_menu_item_new_with_label( NULL, "b" );
3792
        gWidgetData[nScreen].gMenuItemRadioMenuWidget = gtk_radio_menu_item_new_with_label( NULL, "b" );
3793
        gWidgetData[nScreen].gImageMenuItem           = gtk_image_menu_item_new();
3768
        
3794
        
3769
        gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gMenuItemMenuWidget );
3795
        gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gMenuItemMenuWidget );
3770
        gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gMenuItemCheckMenuWidget );
3796
        gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gMenuItemCheckMenuWidget );
3771
        gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gMenuItemRadioMenuWidget );
3797
        gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gMenuItemRadioMenuWidget );
3798
        gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gImageMenuItem );
3772
        
3799
        
3773
        // do what NWAddWidgetToCacheWindow does except adding to def container
3800
        // do what NWAddWidgetToCacheWindow does except adding to def container
3774
        gtk_widget_realize( gWidgetData[nScreen].gMenuWidget );
3801
        gtk_widget_realize( gWidgetData[nScreen].gMenuWidget );
Lines 3783-3792 Link Here
3783
        gtk_widget_realize( gWidgetData[nScreen].gMenuItemRadioMenuWidget );
3810
        gtk_widget_realize( gWidgetData[nScreen].gMenuItemRadioMenuWidget );
3784
        gtk_widget_ensure_style( gWidgetData[nScreen].gMenuItemRadioMenuWidget );
3811
        gtk_widget_ensure_style( gWidgetData[nScreen].gMenuItemRadioMenuWidget );
3785
3812
3813
        gtk_widget_realize( gWidgetData[nScreen].gImageMenuItem );
3814
        gtk_widget_ensure_style( gWidgetData[nScreen].gImageMenuItem );
3815
3786
        gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gMenuWidget ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gMenuWidget );
3816
        gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gMenuWidget ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gMenuWidget );
3787
        gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gMenuItemMenuWidget ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gMenuItemMenuWidget );
3817
        gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gMenuItemMenuWidget ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gMenuItemMenuWidget );
3788
        gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gMenuItemCheckMenuWidget ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gMenuItemCheckMenuWidget );
3818
        gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gMenuItemCheckMenuWidget ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gMenuItemCheckMenuWidget );
3789
        gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gMenuItemRadioMenuWidget ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gMenuItemRadioMenuWidget );
3819
        gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gMenuItemRadioMenuWidget ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gMenuItemRadioMenuWidget );
3820
        gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gImageMenuItem ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gImageMenuItem );
3790
    }
3821
    }
3791
}
3822
}
3792
3823

Return to issue 95318