rpms/openoffice.org/devel openoffice.org-3.0.0.ooo95318.system-showicons.patch, NONE, 1.1 openoffice.org.spec, 1.1675, 1.1676
Caolan McNamara
caolanm at fedoraproject.org
Thu Oct 23 08:02:19 UTC 2008
Author: caolanm
Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27767
Modified Files:
openoffice.org.spec
Added Files:
openoffice.org-3.0.0.ooo95318.system-showicons.patch
Log Message:
add openoffice.org-3.0.0.ooo95318.system-showicons.patch
openoffice.org-3.0.0.ooo95318.system-showicons.patch:
--- NEW FILE openoffice.org-3.0.0.ooo95318.system-showicons.patch ---
Index: registry/schema/org/openoffice/Office/Common.xcs
===================================================================
RCS file: /cvs/util/officecfg/registry/schema/org/openoffice/Office/Common.xcs,v
retrieving revision 1.153.12.1
diff -u -r1.153.12.1 Common.xcs
--- openoffice.org.orig/officecfg/registry/schema/org/openoffice/Office/Common.xcs 31 Jul 2008 18:52:56 -0000 1.153.12.1
+++ openoffice.org/officecfg/registry/schema/org/openoffice/Office/Common.xcs 22 Oct 2008 13:12:43 -0000
@@ -2657,6 +2657,13 @@
</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 -->
Index: inc/svtools/menuoptions.hxx
===================================================================
RCS file: /cvs/util/svtools/inc/svtools/menuoptions.hxx,v
retrieving revision 1.3
diff -u -r1.3 menuoptions.hxx
--- openoffice.org.orig/svtools/inc/svtools/menuoptions.hxx 10 Apr 2008 19:19:15 -0000 1.3
+++ openoffice.org/svtools/inc/svtools/menuoptions.hxx 22 Oct 2008 13:13:51 -0000
@@ -122,11 +122,11 @@
sal_Bool IsEntryHidingEnabled() const;
sal_Bool IsFollowMouseEnabled() const;
- sal_Bool IsMenuIconsEnabled() const;
+ sal_Int16 GetMenuIconsState() const;
void SetEntryHidingState( sal_Bool bState );
void SetFollowMouseState( sal_Bool bState );
- void SetMenuIconsState( sal_Bool bState );
+ void SetMenuIconsState( sal_Int16 bState );
//-------------------------------------------------------------------------------------------------------------
// private methods
Index: source/config/menuoptions.cxx
===================================================================
RCS file: /cvs/util/svtools/source/config/menuoptions.cxx,v
retrieving revision 1.14
diff -u -r1.14 menuoptions.cxx
--- openoffice.org.orig/svtools/source/config/menuoptions.cxx 10 Apr 2008 19:59:24 -0000 1.14
+++ openoffice.org/svtools/source/config/menuoptions.cxx 22 Oct 2008 13:13:51 -0000
@@ -43,6 +43,7 @@
#include <tools/debug.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
+#include <vcl/svapp.hxx>
#include <rtl/logfile.hxx>
#include "itemholder1.hxx"
@@ -63,17 +64,19 @@
#define ROOTNODE_MENU OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/View/Menu" ))
#define DEFAULT_DONTHIDEDISABLEDENTRIES sal_False
#define DEFAULT_FOLLOWMOUSE sal_True
-#define DEFAULT_MENUICONS sal_True
+#define DEFAULT_MENUICONS 2
#define PROPERTYNAME_DONTHIDEDISABLEDENTRIES OUString(RTL_CONSTASCII_USTRINGPARAM("DontHideDisabledEntry" ))
#define PROPERTYNAME_FOLLOWMOUSE OUString(RTL_CONSTASCII_USTRINGPARAM("FollowMouse" ))
#define PROPERTYNAME_SHOWICONSINMENUES OUString(RTL_CONSTASCII_USTRINGPARAM("ShowIconsInMenues" ))
+#define PROPERTYNAME_SYSTEMICONSINMENUES OUString(RTL_CONSTASCII_USTRINGPARAM("IsSystemIconsInMenus" ))
#define PROPERTYHANDLE_DONTHIDEDISABLEDENTRIES 0
#define PROPERTYHANDLE_FOLLOWMOUSE 1
#define PROPERTYHANDLE_SHOWICONSINMENUES 2
+#define PROPERTYHANDLE_SYSTEMICONSINMENUES 3
-#define PROPERTYCOUNT 3
+#define PROPERTYCOUNT 4
#include <tools/link.hxx>
#include <tools/list.hxx>
@@ -93,7 +96,7 @@
LinkList aList;
sal_Bool m_bDontHideDisabledEntries ; /// cache "DontHideDisabledEntries" of Menu section
sal_Bool m_bFollowMouse ; /// cache "FollowMouse" of Menu section
- sal_Bool m_bMenuIcons ; /// cache "MenuIcons" of Menu section
+ sal_Int16 m_nMenuIcons ; /// cache "MenuIcons" of Menu section
//-------------------------------------------------------------------------------------------------------------
// public methods
@@ -169,8 +172,8 @@
sal_Bool IsFollowMouseEnabled() const
{ return m_bFollowMouse; }
- sal_Bool IsMenuIconsEnabled() const
- { return m_bMenuIcons; }
+ sal_Int16 GetMenuIconsState() const
+ { return m_nMenuIcons; }
void SetEntryHidingState ( sal_Bool bState )
{
@@ -190,9 +193,9 @@
Commit();
}
- void SetMenuIconsState ( sal_Bool bState )
+ void SetMenuIconsState ( sal_Int16 bState )
{
- m_bMenuIcons = bState;
+ m_nMenuIcons = bState;
SetModified();
for ( USHORT n=0; n<aList.Count(); n++ )
aList.GetObject(n)->Call( this );
@@ -234,7 +237,7 @@
// Init member then.
, m_bDontHideDisabledEntries ( DEFAULT_DONTHIDEDISABLEDENTRIES )
, m_bFollowMouse ( DEFAULT_FOLLOWMOUSE )
- , m_bMenuIcons ( DEFAULT_MENUICONS )
+ , m_nMenuIcons ( DEFAULT_MENUICONS )
{
// Use our static list of configuration keys to get his values.
Sequence< OUString > seqNames = impl_GetPropertyNames();
@@ -245,6 +248,9 @@
// Follow assignment use order of values in relation to our list of key names!
DBG_ASSERT( !(seqNames.getLength()!=seqValues.getLength()), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nI miss some values of configuration keys!\n" );
+ sal_Bool bMenuIcons = true;
+ sal_Bool bSystemMenuIcons = true;
+
// Copy values from list in right order to ouer internal member.
sal_Int32 nPropertyCount = seqValues.getLength() ;
sal_Int32 nProperty = 0 ;
@@ -268,12 +274,19 @@
break;
case PROPERTYHANDLE_SHOWICONSINMENUES : {
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\ShowIconsInMenues\"?" );
- seqValues[nProperty] >>= m_bMenuIcons;
+ seqValues[nProperty] >>= bMenuIcons;
+ }
+ break;
+ case PROPERTYHANDLE_SYSTEMICONSINMENUES : {
+ DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\IsSystemIconsInMenus\"?" );
+ seqValues[nProperty] >>= bSystemMenuIcons;
}
break;
}
}
+ m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons;
+
EnableNotification( seqNames );
}
@@ -303,6 +316,10 @@
// Safe impossible cases.
// We need values from ALL notified configuration keys.
DBG_ASSERT( !(seqPropertyNames.getLength()!=seqValues.getLength()), "SvtMenuOptions_Impl::Notify()\nI miss some values of configuration keys!\n" );
+
+ sal_Bool bMenuIcons = true;
+ sal_Bool bSystemMenuIcons = true;
+
// Step over list of property names and get right value from coreesponding value list to set it on internal members!
sal_Int32 nCount = seqPropertyNames.getLength();
for( sal_Int32 nProperty=0; nProperty<nCount; ++nProperty )
@@ -312,22 +329,29 @@
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::Notify()\nWho has changed the value type of \"Office.Common\\View\\Menu\\DontHideDisabledEntry\"?" );
seqValues[nProperty] >>= m_bDontHideDisabledEntries;
}
- else
- if( seqPropertyNames[nProperty] == PROPERTYNAME_FOLLOWMOUSE )
+ else if( seqPropertyNames[nProperty] == PROPERTYNAME_FOLLOWMOUSE )
{
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::Notify()\nWho has changed the value type of \"Office.Common\\View\\Menu\\FollowMouse\"?" );
seqValues[nProperty] >>= m_bFollowMouse;
}
- if( seqPropertyNames[nProperty] == PROPERTYNAME_SHOWICONSINMENUES )
+ else if( seqPropertyNames[nProperty] == PROPERTYNAME_SHOWICONSINMENUES )
{
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\ShowIconsInMenues\"?" );
- seqValues[nProperty] >>= m_bMenuIcons;
+ seqValues[nProperty] >>= bMenuIcons;
}
+ else if( seqPropertyNames[nProperty] == PROPERTYNAME_SYSTEMICONSINMENUES )
+ {
+ DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\IsSystemIconsInMenus\"?" );
+ seqValues[nProperty] >>= bSystemMenuIcons;
+ }
+
#if OSL_DEBUG_LEVEL > 1
else DBG_ASSERT( sal_False, "SvtMenuOptions_Impl::Notify()\nUnkown property detected ... I can't handle these!\n" );
#endif
}
+ m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons;
+
for ( USHORT n=0; n<aList.Count(); n++ )
aList.GetObject(n)->Call( this );
}
@@ -354,8 +378,13 @@
seqValues[nProperty] <<= m_bFollowMouse;
}
break;
+ //Output cache of current setting as possibly modified by System Theme for older version
case PROPERTYHANDLE_SHOWICONSINMENUES : {
- seqValues[nProperty] <<= m_bMenuIcons;
+ seqValues[nProperty] <<=(sal_Bool)(Application::GetSettings().GetStyleSettings().GetUseImagesInMenus());
+ }
+ break;
+ case PROPERTYHANDLE_SYSTEMICONSINMENUES : {
+ seqValues[nProperty] <<= (m_nMenuIcons == 2 ? sal_True : sal_False) ;
}
break;
}
@@ -374,7 +403,8 @@
{
PROPERTYNAME_DONTHIDEDISABLEDENTRIES ,
PROPERTYNAME_FOLLOWMOUSE ,
- PROPERTYNAME_SHOWICONSINMENUES
+ PROPERTYNAME_SHOWICONSINMENUES ,
+ PROPERTYNAME_SYSTEMICONSINMENUES
};
// Initialize return sequence with these list ...
static const Sequence< OUString > seqPropertyNames( pProperties, PROPERTYCOUNT );
@@ -483,16 +513,16 @@
//*****************************************************************************************************************
// public method
//*****************************************************************************************************************
-sal_Bool SvtMenuOptions::IsMenuIconsEnabled() const
+sal_Int16 SvtMenuOptions::GetMenuIconsState() const
{
MutexGuard aGuard( GetOwnStaticMutex() );
- return m_pDataContainer->IsMenuIconsEnabled();
+ return m_pDataContainer->GetMenuIconsState();
}
//*****************************************************************************************************************
// public method
//*****************************************************************************************************************
-void SvtMenuOptions::SetMenuIconsState( sal_Bool bState )
+void SvtMenuOptions::SetMenuIconsState( sal_Int16 bState )
{
MutexGuard aGuard( GetOwnStaticMutex() );
m_pDataContainer->SetMenuIconsState( bState );
Index: source/uno/contextmenuhelper.cxx
===================================================================
RCS file: /cvs/util/svtools/source/uno/contextmenuhelper.cxx,v
retrieving revision 1.5
diff -u -r1.5 contextmenuhelper.cxx
--- openoffice.org.orig/svtools/source/uno/contextmenuhelper.cxx 10 Apr 2008 22:08:44 -0000 1.5
+++ openoffice.org/svtools/source/uno/contextmenuhelper.cxx 22 Oct 2008 13:14:09 -0000
@@ -606,7 +606,7 @@
// Retrieve some settings necessary to display complete context
// menu correctly.
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- bool bShowMenuImages( SvtMenuOptions().IsMenuIconsEnabled() );
+ bool bShowMenuImages( rSettings.GetUseImagesInMenus() );
bool bIsHiContrast( rSettings.GetMenuColor().IsDark() );
if ( pMenu )
Index: source/classes/bmkmenu.cxx
===================================================================
RCS file: /cvs/framework/framework/source/classes/bmkmenu.cxx,v
retrieving revision 1.18
diff -u -r1.18 bmkmenu.cxx
--- openoffice.org.orig/framework/source/classes/bmkmenu.cxx 24 Jun 2008 16:55:05 -0000 1.18
+++ openoffice.org/framework/source/classes/bmkmenu.cxx 22 Oct 2008 10:15:27 -0000
@@ -175,14 +175,15 @@
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();
Index: source/classes/menumanager.cxx
===================================================================
RCS file: /cvs/framework/framework/source/classes/menumanager.cxx,v
retrieving revision 1.41
diff -u -r1.41 menumanager.cxx
--- openoffice.org.orig/framework/source/classes/menumanager.cxx 11 Apr 2008 08:18:24 -0000 1.41
+++ openoffice.org/framework/source/classes/menumanager.cxx 22 Oct 2008 10:15:27 -0000
@@ -160,7 +160,7 @@
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 @@
{
// 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 @@
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 )
Index: source/uielement/controlmenucontroller.cxx
===================================================================
RCS file: /cvs/framework/framework/source/uielement/controlmenucontroller.cxx,v
retrieving revision 1.11
diff -u -r1.11 controlmenucontroller.cxx
--- openoffice.org.orig/framework/source/uielement/controlmenucontroller.cxx 17 Jul 2008 15:21:53 -0000 1.11
+++ openoffice.org/framework/source/uielement/controlmenucontroller.cxx 22 Oct 2008 10:15:27 -0000
@@ -229,7 +229,8 @@
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
m_bWasHiContrast = rSettings.GetMenuColor().IsDark();
- m_bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled();
+ m_bShowMenuImages = rSettings.GetUseImagesInMenus();
+
}
ControlMenuController::~ControlMenuController()
@@ -408,7 +409,7 @@
// 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 )
Index: source/uielement/menubarmanager.cxx
===================================================================
RCS file: /cvs/framework/framework/source/uielement/menubarmanager.cxx,v
retrieving revision 1.52
diff -u -r1.52 menubarmanager.cxx
--- openoffice.org.orig/framework/source/uielement/menubarmanager.cxx 17 Jul 2008 15:24:28 -0000 1.52
+++ openoffice.org/framework/source/uielement/menubarmanager.cxx 22 Oct 2008 10:15:28 -0000
@@ -1048,7 +1048,8 @@
{
// 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 );
@@ -1072,7 +1073,6 @@
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();
@@ -1584,7 +1584,7 @@
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();
Index: source/uielement/newmenucontroller.cxx
===================================================================
RCS file: /cvs/framework/framework/source/uielement/newmenucontroller.cxx,v
retrieving revision 1.12
diff -u -r1.12 newmenucontroller.cxx
--- openoffice.org.orig/framework/source/uielement/newmenucontroller.cxx 17 Jul 2008 15:24:40 -0000 1.12
+++ openoffice.org/framework/source/uielement/newmenucontroller.cxx 22 Oct 2008 10:15:28 -0000
@@ -489,7 +489,7 @@
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();
@@ -615,10 +615,12 @@
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" );
}
}
Index: source/uielement/toolbarsmenucontroller.cxx
===================================================================
RCS file: /cvs/framework/framework/source/uielement/toolbarsmenucontroller.cxx,v
retrieving revision 1.21
diff -u -r1.21 toolbarsmenucontroller.cxx
--- openoffice.org.orig/framework/source/uielement/toolbarsmenucontroller.cxx 17 Jul 2008 15:25:20 -0000 1.21
+++ openoffice.org/framework/source/uielement/toolbarsmenucontroller.cxx 22 Oct 2008 10:15:28 -0000
@@ -213,7 +213,7 @@
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 );
Index: source/menu/mnuitem.cxx
===================================================================
RCS file: /cvs/framework/sfx2/source/menu/mnuitem.cxx,v
retrieving revision 1.24
diff -u -r1.24 mnuitem.cxx
--- openoffice.org.orig/sfx2/source/menu/mnuitem.cxx 13 May 2008 13:06:16 -0000 1.24
+++ openoffice.org/sfx2/source/menu/mnuitem.cxx 22 Oct 2008 10:17:23 -0000
@@ -446,7 +446,7 @@
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 );
@@ -472,7 +472,7 @@
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 ) ||
Index: source/menu/virtmenu.cxx
===================================================================
RCS file: /cvs/framework/sfx2/source/menu/virtmenu.cxx,v
retrieving revision 1.48
diff -u -r1.48 virtmenu.cxx
--- openoffice.org.orig/sfx2/source/menu/virtmenu.cxx 11 Apr 2008 13:32:44 -0000 1.48
+++ openoffice.org/sfx2/source/menu/virtmenu.cxx 22 Oct 2008 10:17:23 -0000
@@ -443,7 +443,7 @@
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 @@
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, 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 @@
void SfxVirtualMenu::UpdateImages()
{
- SvtMenuOptions aOptions;
- BOOL bIcons = aOptions.IsMenuIconsEnabled();
+ BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
if ( bIcons )
{
@@ -731,10 +729,9 @@
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 @@
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 ));
Index: source/toolbox/tbxitem.cxx
===================================================================
RCS file: /cvs/framework/sfx2/source/toolbox/tbxitem.cxx,v
retrieving revision 1.70
diff -u -r1.70 tbxitem.cxx
--- openoffice.org.orig/sfx2/source/toolbox/tbxitem.cxx 17 Jul 2008 15:32:53 -0000 1.70
+++ openoffice.org/sfx2/source/toolbox/tbxitem.cxx 22 Oct 2008 10:17:23 -0000
@@ -1497,7 +1497,7 @@
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() );
}
@@ -1773,7 +1773,7 @@
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 ) ||
Index: source/dialog/optgdlg.cxx
===================================================================
RCS file: /cvs/graphics/svx/source/dialog/optgdlg.cxx,v
retrieving revision 1.52.40.1
diff -u -r1.52.40.1 optgdlg.cxx
--- openoffice.org.orig/svx/source/dialog/optgdlg.cxx 30 Jul 2008 14:22:51 -0000 1.52.40.1
+++ openoffice.org/svx/source/dialog/optgdlg.cxx 22 Oct 2008 10:18:55 -0000
@@ -691,7 +691,7 @@
aAAPointLimitUnits ( this, SVX_RES( FT_POINTLIMIT_UNIT )),
#endif
aMenuFL ( this, SVX_RES( FL_MENU ) ),
- aMenuIconsCB ( this, SVX_RES( CB_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 ) ),
@@ -759,7 +759,7 @@
Control* pMiscOptions[] =
{
&aMenuFL, &aFontShowCB,
- &aFontListsFL, &aFontHistoryCB, &aMenuIconsCB
+ &aFontListsFL, &aFontHistoryCB, &aMenuIconsLB
};
// temporaryly create the checkbox for the anti aliasing (we need to to determine it's pos)
@@ -939,23 +939,18 @@
}
#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() )
@@ -1014,7 +1009,6 @@
// 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);
@@ -1022,6 +1016,12 @@
Application::SetSettings(aAllSettings);
}
+ if ( bAppearanceChanged )
+ {
+ pAppearanceCfg->Commit();
+ pAppearanceCfg->SetApplicationDefaults ( GetpApp() );
+ }
+
return bModified;
}
@@ -1086,8 +1086,8 @@
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() );
if ( pCanvasSettings && pCanvasSettings->IsHardwareAccelerationAvailable() )
Index: source/dialog/optgdlg.hrc
===================================================================
RCS file: /cvs/graphics/svx/source/dialog/optgdlg.hrc,v
retrieving revision 1.22
diff -u -r1.22 optgdlg.hrc
--- openoffice.org.orig/svx/source/dialog/optgdlg.hrc 1 Jul 2008 23:00:01 -0000 1.22
+++ openoffice.org/svx/source/dialog/optgdlg.hrc 22 Oct 2008 10:18:55 -0000
@@ -72,8 +72,8 @@
#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_LB_MENU_ICONS (ROW_FL_MENU + 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)
@@ -133,7 +133,7 @@
#define FT_MOUSEMIDDLE 33
#define LB_MOUSEMIDDLE 34
-#define CB_MENU_ICONS 40
+#define LB_MENU_ICONS 40
#define FL_MENU 41
#define FL_FONTLISTS 42
Index: source/dialog/optgdlg.hxx
===================================================================
RCS file: /cvs/graphics/svx/source/dialog/optgdlg.hxx,v
retrieving revision 1.23
diff -u -r1.23 optgdlg.hxx
--- openoffice.org.orig/svx/source/dialog/optgdlg.hxx 24 Jun 2008 11:34:42 -0000 1.23
+++ openoffice.org/svx/source/dialog/optgdlg.hxx 22 Oct 2008 10:18:55 -0000
@@ -110,7 +110,7 @@
#endif
FixedLine aMenuFL;
- CheckBox aMenuIconsCB;
+ ListBox aMenuIconsLB;
FixedLine aFontListsFL;
CheckBox aFontShowCB;
Index: source/dialog/optgdlg.src
===================================================================
RCS file: /cvs/graphics/svx/source/dialog/optgdlg.src,v
retrieving revision 1.32
diff -u -r1.32 optgdlg.src
--- openoffice.org.orig/svx/source/dialog/optgdlg.src 4 Jul 2008 17:32:06 -0000 1.32
+++ openoffice.org/svx/source/dialog/optgdlg.src 22 Oct 2008 10:18:55 -0000
@@ -298,12 +298,19 @@
Size = MAP_APPFONT ( 120 , 8 ) ;
Text [ en-US ] = "Menu" ;
};
- CheckBox CB_MENU_ICONS
+ ListBox LB_MENU_ICONS
{
+ Pos = MAP_APPFONT ( 12 , ROW_LB_MENU_ICONS ) ;
+ Size = MAP_APPFONT ( 45 , 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 Icons" ; > ;
+ < "Show Icons" ; > ;
+ };
};
FixedLine FL_FONTLISTS
{
Index: source/app/app.cxx
===================================================================
RCS file: /cvs/framework/desktop/source/app/app.cxx,v
retrieving revision 1.223.26.2
diff -u -r1.223.26.2 app.cxx
--- openoffice.org.orig/desktop/source/app/app.cxx 12 Sep 2008 14:39:01 -0000 1.223.26.2
+++ openoffice.org/desktop/source/app/app.cxx 22 Oct 2008 10:21:45 -0000
@@ -125,6 +125,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>
@@ -1465,7 +1412,7 @@
SvtFontSubstConfig().Apply();
SvtTabAppearanceCfg aAppearanceCfg;
- //aAppearanceCfg.SetInitialized();
+ aAppearanceCfg.SetInitialized();
aAppearanceCfg.SetApplicationDefaults( this );
SvtAccessibilityOptions aOptions;
aOptions.SetVCLSettings();
@@ -1725,6 +1677,24 @@
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() )
Index: aqua/source/window/salframe.cxx
===================================================================
RCS file: /cvs/gsl/vcl/aqua/source/window/salframe.cxx,v
retrieving revision 1.66.16.3
diff -u -r1.66.16.3 salframe.cxx
--- openoffice.org.orig/vcl/aqua/source/window/salframe.cxx 21 Aug 2008 15:32:23 -0000 1.66.16.3
+++ openoffice.org/vcl/aqua/source/window/salframe.cxx 23 Oct 2008 07:50:08 -0000
@@ -1161,6 +1161,9 @@
// set scrollbar size
aStyleSettings.SetScrollBarSize( [NSScroller scrollerWidth] );
+
+ aStyleSettings.SetUseImagesInMenus(false);
+ aStyleSettings.SetUseImagesWithChecksInMenus(false);
rSettings.SetStyleSettings( aStyleSettings );
Index: inc/vcl/settings.hxx
===================================================================
RCS file: /cvs/gsl/vcl/inc/vcl/settings.hxx,v
retrieving revision 1.7
diff -u -r1.7 settings.hxx
--- openoffice.org.orig/vcl/inc/vcl/settings.hxx 4 Jul 2008 17:23:04 -0000 1.7
+++ openoffice.org/vcl/inc/vcl/settings.hxx 23 Oct 2008 07:50:09 -0000
@@ -426,12 +426,13 @@
USHORT mnUseSystemUIFonts;
USHORT mnAutoMnemonic;
USHORT mnUseImagesInMenus;
+ USHORT mnUseImagesWithChecksInMenus;
ULONG mnUseFlatBorders;
long mnMinThumbSize;
ULONG mnSymbolsStyle;
ULONG mnPreferredSymbolsStyle;
USHORT mnSkipDisabledInMenus;
Wallpaper maWorkspaceGradient;
};
#define DEFAULT_WORKSPACE_GRADIENT_START_COLOR Color( 0xa3, 0xae, 0xb8 )
@@ -730,11 +732,15 @@
{ CopyData(); mpData->mnUseImagesInMenus = bUseImagesInMenus; }
BOOL GetUseImagesInMenus() const
{ return (BOOL) mpData->mnUseImagesInMenus; }
+ void SetUseImagesWithChecksInMenus( BOOL bUseImagesWithChecksInMenus)
+ { CopyData(); mpData->mnUseImagesWithChecksInMenus = bUseImagesWithChecksInMenus; }
+ BOOL GetUseImagesWithChecksInMenus() const
+ { return (BOOL) mpData->mnUseImagesWithChecksInMenus; }
void SetSkipDisabledInMenus( BOOL bSkipDisabledInMenus )
{ CopyData(); mpData->mnSkipDisabledInMenus = bSkipDisabledInMenus; }
BOOL GetSkipDisabledInMenus() const
{ return (BOOL) mpData->mnSkipDisabledInMenus; }
void SetAppFont( const Font& rFont )
{ CopyData(); mpData->maAppFont = rFont; }
const Font& GetAppFont() const
Index: source/app/settings.cxx
===================================================================
RCS file: /cvs/gsl/vcl/source/app/settings.cxx,v
retrieving revision 1.77
diff -u -r1.77 settings.cxx
--- openoffice.org.orig/vcl/source/app/settings.cxx 4 Jul 2008 17:34:44 -0000 1.77
+++ openoffice.org/vcl/source/app/settings.cxx 23 Oct 2008 07:50:10 -0000
@@ -533,10 +534,11 @@
mnUseFlatMenues = rData.mnUseFlatMenues;
mnAutoMnemonic = rData.mnAutoMnemonic;
mnUseImagesInMenus = rData.mnUseImagesInMenus;
+ mnUseImagesWithChecksInMenus = rData.mnUseImagesWithChecksInMenus;
mnSkipDisabledInMenus = rData.mnSkipDisabledInMenus;
mnToolbarIconSize = rData.mnToolbarIconSize;
mnSymbolsStyle = rData.mnSymbolsStyle;
mnPreferredSymbolsStyle = rData.mnPreferredSymbolsStyle;
}
// -----------------------------------------------------------------------
@@ -623,6 +626,7 @@
mnUseFlatBorders = 0;
mnUseFlatMenues = 0;
mnUseImagesInMenus = (USHORT)TRUE;
+ mnUseImagesWithChecksInMenus = (USHORT)TRUE;
mnSkipDisabledInMenus = (USHORT)FALSE;
Gradient aGrad( GRADIENT_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR );
@@ -1048,6 +1052,7 @@
(mpData->maFieldFont == rSet.mpData->maFieldFont) &&
(mpData->maIconFont == rSet.mpData->maIconFont) &&
(mpData->mnUseImagesInMenus == rSet.mpData->mnUseImagesInMenus) &&
+ (mpData->mnUseImagesWithChecksInMenus == rSet.mpData->mnUseImagesWithChecksInMenus) &&
(mpData->mnSkipDisabledInMenus == rSet.mpData->mnSkipDisabledInMenus) &&
(mpData->maFontColor == rSet.mpData->maFontColor ))
return TRUE;
Index: source/window/menu.cxx
===================================================================
RCS file: /cvs/gsl/vcl/source/window/menu.cxx,v
retrieving revision 1.164.46.1
diff -u -r1.164.46.1 menu.cxx
--- openoffice.org.orig/vcl/source/window/menu.cxx 6 Aug 2008 18:27:34 -0000 1.164.46.1
+++ openoffice.org/vcl/source/window/menu.cxx 23 Oct 2008 07:50:13 -0000
@@ -963,7 +963,11 @@
{
mnHighlightedItemPos = ITEMPOS_INVALID;
mpSalMenu = NULL;
- nMenuFlags = MENU_FLAG_SHOWCHECKIMAGES;
+
+ nMenuFlags =
+ Application::GetSettings().GetStyleSettings().GetUseImagesWithChecksInMenus() ?
+ MENU_FLAG_SHOWCHECKIMAGES : 0;
+
nDefaultItem = 0;
//bIsMenuBar = FALSE; // this is now set in the ctor, must not be changed here!!!
nSelectedId = 0;
Index: source/window/window.cxx
===================================================================
RCS file: /cvs/gsl/vcl/source/window/window.cxx,v
retrieving revision 1.285
diff -u -r1.285 window.cxx
--- openoffice.org.orig/vcl/source/window/window.cxx 25 Jul 2008 09:10:13 -0000 1.285
+++ openoffice.org/vcl/source/window/window.cxx 23 Oct 2008 07:50:15 -0000
@@ -470,6 +474,7 @@
}
}
+#if 0
// Detect if images in menus are allowed or not
{
sal_Bool bTmp = sal_False, bUseImagesInMenus = sal_True;
@@ -480,13 +485,18 @@
{
::com::sun::star::uno::Any aValue = aNode.getNodeValue( OUString::createFromAscii( "ShowIconsInMenues" ) );
if( aValue >>= bTmp )
+ {
bUseImagesInMenus = bTmp;
+ fprintf(stderr, "bUseImagesInMenus set to %d\n", bUseImagesInMenus);
+ }
}
aStyleSettings = rSettings.GetStyleSettings();
+ fprintf(stderr, "using %d\n", bUseImagesInMenus);
aStyleSettings.SetUseImagesInMenus( bUseImagesInMenus );
rSettings.SetStyleSettings( aStyleSettings );
}
+#endif
#ifdef DBG_UTIL
// Evt. AppFont auf Fett schalten, damit man feststellen kann,
Index: unx/gtk/gdi/salnativewidgets-gtk.cxx
===================================================================
RCS file: /cvs/gsl/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx,v
retrieving revision 1.47
diff -u -r1.47 salnativewidgets-gtk.cxx
--- openoffice.org.orig/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 16 Jun 2008 14:30:38 -0000 1.47
+++ openoffice.org/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 23 Oct 2008 07:50:17 -0000
@@ -96,6 +97,7 @@
GtkWidget * gMenuItemMenuWidget;
GtkWidget * gMenuItemCheckMenuWidget;
GtkWidget * gMenuItemRadioMenuWidget;
+ GtkWidget * gImageMenuItem;
GtkWidget * gTooltipPopup;
GtkWidget * gProgressBar;
@@ -130,6 +132,7 @@
gMenuItemMenuWidget( NULL ),
gMenuItemCheckMenuWidget( NULL ),
gMenuItemRadioMenuWidget( NULL ),
+ gImageMenuItem( NULL ),
gTooltipPopup( NULL ),
gProgressBar( NULL ),
gNWPixmapCacheList( NULL ),
@@ -3326,6 +3340,13 @@
else
aStyleSet.SetCursorBlinkTime( STYLE_CURSOR_NOBLINKTIME );
+ gboolean showmenuicons = true;
+ pSettings = gtk_widget_get_settings( gWidgetData[m_nScreen].gImageMenuItem );
+ g_object_get( pSettings, "gtk-menu-images", &showmenuicons, (char *)NULL );
+ aStyleSet.SetUseImagesInMenus( showmenuicons );
+
+ aStyleSet.SetUseImagesWithChecksInMenus( false );
+
// set scrollbar settings
gint slider_width = 14;
gint trough_border = 1;
@@ -3765,10 +3791,12 @@
gWidgetData[nScreen].gMenuItemMenuWidget = gtk_menu_item_new_with_label( "b" );
gWidgetData[nScreen].gMenuItemCheckMenuWidget = gtk_check_menu_item_new_with_label( "b" );
gWidgetData[nScreen].gMenuItemRadioMenuWidget = gtk_radio_menu_item_new_with_label( NULL, "b" );
+ gWidgetData[nScreen].gImageMenuItem = gtk_image_menu_item_new();
gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gMenuItemMenuWidget );
gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gMenuItemCheckMenuWidget );
gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gMenuItemRadioMenuWidget );
+ gtk_menu_shell_append( GTK_MENU_SHELL( gWidgetData[nScreen].gMenuWidget ), gWidgetData[nScreen].gImageMenuItem );
// do what NWAddWidgetToCacheWindow does except adding to def container
gtk_widget_realize( gWidgetData[nScreen].gMenuWidget );
@@ -3783,10 +3811,14 @@
gtk_widget_realize( gWidgetData[nScreen].gMenuItemRadioMenuWidget );
gtk_widget_ensure_style( gWidgetData[nScreen].gMenuItemRadioMenuWidget );
+ gtk_widget_realize( gWidgetData[nScreen].gImageMenuItem );
+ gtk_widget_ensure_style( gWidgetData[nScreen].gImageMenuItem );
+
gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gMenuWidget ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gMenuWidget );
gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gMenuItemMenuWidget ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gMenuItemMenuWidget );
gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gMenuItemCheckMenuWidget ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gMenuItemCheckMenuWidget );
gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gMenuItemRadioMenuWidget ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gMenuItemRadioMenuWidget );
+ gWidgetDefaultFlags[ (long)gWidgetData[nScreen].gImageMenuItem ] = GTK_WIDGET_FLAGS( gWidgetData[nScreen].gImageMenuItem );
}
}
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.1675
retrieving revision 1.1676
diff -u -r1.1675 -r1.1676
--- openoffice.org.spec 20 Oct 2008 15:37:46 -0000 1.1675
+++ openoffice.org.spec 23 Oct 2008 08:01:49 -0000 1.1676
@@ -1,6 +1,6 @@
%define oootag OOO300
%define ooomilestone 9
-%define rh_rpm_release 5
+%define rh_rpm_release 6
# rhbz#465664 jar-repacking breaks help by reordering META-INF/MANIFEST.MF
%define __jar_repack %{nil}
@@ -121,6 +121,7 @@
Patch48: openoffice.org-3.0.0.ooo94938.unopkg.handleexception.patch
Patch49: openoffice.org-3.0.0.ooo94659.sal.magazine.patch
Patch50: openoffice.org-3.0.0.ooo95018.sal.fdwarnings.patch
+Patch51: openoffice.org-3.0.0.ooo95318.system-showicons.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/openoffice.org
@@ -1325,6 +1326,7 @@
%patch48 -p1 -b .ooo94938.unopkg.handleexception.patch
%patch49 -p1 -b .ooo94659.sal.magazine.patch
%patch50 -p1 -b .ooo95018.sal.fdwarnings.patch
+%patch51 -p1 -b .ooo95318.system-showicons.patch
%build
echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -3690,6 +3692,10 @@
unopkg list --shared > /dev/null 2>&1 || :
%changelog
+* Thu Oct 23 2008 Caolán McNamara <caolanm at redhat.com> - 1:3.0.0-9.6
+- add openoffice.org-3.0.0.ooo95318.system-showicons.patch to honour
+ gtk-menu-images setting
+
* Mon Oct 20 2008 Caolán McNamara <caolanm at redhat.com> - 1:3.0.0-9.5
- Resolves: rhbz#466603 odd focus troubles with floating toolbars
"The focus window is an ancestor of the newly mapped
More information about the scm-commits
mailing list