[ooo-build-commit] .: 2 commits - svtools/source vcl/aqua vcl/inc vcl/source vcl/unx

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


 svtools/source/config/menuoptions.cxx    |   19 +++++++++++++------
 vcl/aqua/source/window/salframe.cxx      |    2 +-
 vcl/inc/vcl/salobj.hxx                   |    2 +-
 vcl/inc/vcl/settings.hxx                 |   12 ++++++++++--
 vcl/source/app/settings.cxx              |   18 +++++++++++++++++-
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |    2 +-
 6 files changed, 43 insertions(+), 12 deletions(-)

New commits:
commit 84483c730813fdb49b7b30290ad0c71189650621
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 5 09:50:59 2010 +0100

    silence this annoying warning

diff --git a/vcl/inc/vcl/salobj.hxx b/vcl/inc/vcl/salobj.hxx
index 854aad2..11616ed 100644
--- a/vcl/inc/vcl/salobj.hxx
+++ b/vcl/inc/vcl/salobj.hxx
@@ -71,7 +71,7 @@ public:
     virtual void					SetBackground() = 0;
     virtual void					SetBackground( SalColor nSalColor ) = 0;
 
-        virtual void                                    SetForwardKey( BOOL bEnable ) {}
+    virtual void					SetForwardKey( BOOL /*bEnable*/ ) {}
 
     virtual const SystemEnvData*	GetSystemData() const = 0;
 
commit c4afbff751b1bd2b4dbb898a5261ab6d7a683682
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 1 20:40:46 2010 +0100

    fixup show menus in icons

diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx
index 23f8341..7ab4216 100644
--- a/svtools/source/config/menuoptions.cxx
+++ b/svtools/source/config/menuoptions.cxx
@@ -190,9 +190,9 @@ class SvtMenuOptions_Impl : public ConfigItem
                         Commit();
                     }
 
-        void		SetMenuIconsState ( sal_Int16 bState	)
+        void		SetMenuIconsState ( sal_Int16 nState	)
                     {
-                        m_nMenuIcons = bState;
+                        m_nMenuIcons = nState;
                         SetModified();
                         for ( USHORT n=0; n<aList.Count(); n++ )
                             aList.GetObject(n)->Call( this );
@@ -245,8 +245,15 @@ SvtMenuOptions_Impl::SvtMenuOptions_Impl()
     // 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;
+    sal_Bool bMenuIcons = sal_True;
+    sal_Bool bSystemMenuIcons = sal_True;
+    if (m_nMenuIcons == 2)
+        bMenuIcons = (sal_Bool)(Application::GetSettings().GetStyleSettings().GetPreferredUseImagesInMenus());
+    else
+    {
+        bSystemMenuIcons = sal_False;
+        bMenuIcons = m_nMenuIcons ? sal_True : sal_False;
+    }
 
     // Copy values from list in right order to ouer internal member.
     sal_Int32 nPropertyCount	=	seqValues.getLength()	;
@@ -335,12 +342,12 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames )
         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\"?" );
-            bMenuSettingsChanged = seqValues[nProperty] >>= bMenuIcons;
+            bMenuSettingsChanged |= 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\"?" );
-            bMenuSettingsChanged = seqValues[nProperty] >>= bSystemMenuIcons;
+            bMenuSettingsChanged |= seqValues[nProperty] >>= bSystemMenuIcons;
         }
 
         #if OSL_DEBUG_LEVEL > 1
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index 6fb4d2e..203fab3 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -1224,7 +1224,7 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
     aStyleSettings.SetScrollBarSize( static_cast<long int>([NSScroller scrollerWidth]) );
 
     // images in menus false for MacOSX
-    aStyleSettings.SetUseImagesInMenus( false );
+    aStyleSettings.SetPreferredUseImagesInMenus( false );
     
     rSettings.SetStyleSettings( aStyleSettings );
 
diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx
index 9ce0116..b201477 100644
--- a/vcl/inc/vcl/settings.hxx
+++ b/vcl/inc/vcl/settings.hxx
@@ -431,6 +431,7 @@ private:
     USHORT                          mnUseSystemUIFonts;
     USHORT                          mnAutoMnemonic;
     USHORT                          mnUseImagesInMenus;
+    BOOL                            mbPreferredUseImagesInMenus;
     ULONG                           mnUseFlatBorders;
     long                            mnMinThumbSize;
     ULONG                           mnSymbolsStyle;
@@ -525,6 +526,10 @@ private:
 #define STYLE_SYMBOLS_CLASSIC		((ULONG)7)
 #define STYLE_SYMBOLS_THEMES_MAX	((ULONG)8)
 
+#define STYLE_MENUIMAGES_OFF  ((USHORT)0)
+#define STYLE_MENUIMAGES_ON   ((USHORT)1)
+#define STYLE_MENUIMAGES_AUTO ((USHORT)2)
+
 #define STYLE_CURSOR_NOBLINKTIME    ((ULONG)0xFFFFFFFF)
 
 class VCL_DLLPUBLIC StyleSettings
@@ -748,8 +753,11 @@ public:
                                         { return (BOOL) mpData->mnUseFlatMenues; }
     void							SetUseImagesInMenus( BOOL bUseImagesInMenus )
                                         { CopyData(); mpData->mnUseImagesInMenus = bUseImagesInMenus; }
-    BOOL							GetUseImagesInMenus() const
-                                        { return (BOOL) mpData->mnUseImagesInMenus; }
+    BOOL							GetUseImagesInMenus() const;
+    void                                                       SetPreferredUseImagesInMenus( BOOL bPreferredUseImagesInMenus )
+                                        { CopyData(); mpData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus; }
+    BOOL                                                       GetPreferredUseImagesInMenus() const
+                                        { return mpData->mbPreferredUseImagesInMenus; }
     void							SetSkipDisabledInMenus( BOOL bSkipDisabledInMenus )
                                         { CopyData(); mpData->mnSkipDisabledInMenus = bSkipDisabledInMenus; }
     BOOL							GetSkipDisabledInMenus() const
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 25ea671..c2bf39e 100755
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -432,6 +432,7 @@ ImplStyleData::ImplStyleData()
     mnAutoMnemonic				= 1;
     mnToolbarIconSize			= STYLE_TOOLBAR_ICONSIZE_UNKNOWN;
     mnSymbolsStyle				= STYLE_SYMBOLS_AUTO;
+    mnUseImagesInMenus			= STYLE_MENUIMAGES_AUTO;
     mnPreferredSymbolsStyle			= STYLE_SYMBOLS_AUTO;
     mpFontOptions              = NULL;
 
@@ -536,6 +537,7 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
     mnUseFlatMenues 			= rData.mnUseFlatMenues;
     mnAutoMnemonic				= rData.mnAutoMnemonic;
     mnUseImagesInMenus			= rData.mnUseImagesInMenus;
+    mbPreferredUseImagesInMenus	= rData.mbPreferredUseImagesInMenus;
     mnSkipDisabledInMenus		= rData.mnSkipDisabledInMenus;
     mnToolbarIconSize			= rData.mnToolbarIconSize;
     mnSymbolsStyle				= rData.mnSymbolsStyle;
@@ -629,7 +631,7 @@ void ImplStyleData::SetStandardStyles()
     mnUseSystemUIFonts			= 1;
     mnUseFlatBorders 			= 0;
     mnUseFlatMenues 			= 0;
-    mnUseImagesInMenus			= (USHORT)TRUE;
+    mbPreferredUseImagesInMenus	= TRUE;
     mnSkipDisabledInMenus		= (USHORT)FALSE;
 
     Gradient aGrad( GRADIENT_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR );
@@ -867,6 +869,19 @@ bool StyleSettings::CheckSymbolStyle( ULONG nStyle ) const
 
 // -----------------------------------------------------------------------
 
+BOOL StyleSettings::GetUseImagesInMenus() const
+{
+    // icon mode selected in Tools -> Options... -> OpenOffice.org -> View
+    USHORT nStyle = mpData->mnUseImagesInMenus;
+
+    if ( nStyle == STYLE_MENUIMAGES_AUTO )
+        return GetPreferredUseImagesInMenus();
+
+    return (BOOL)nStyle;
+}
+
+// -----------------------------------------------------------------------
+
 void StyleSettings::SetStandardStyles()
 {
     CopyData();
@@ -1103,6 +1118,7 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
          (mpData->maFieldFont               == rSet.mpData->maFieldFont)                &&
          (mpData->maIconFont                == rSet.mpData->maIconFont)					&&
          (mpData->mnUseImagesInMenus		== rSet.mpData->mnUseImagesInMenus)			&&
+         (mpData->mbPreferredUseImagesInMenus == rSet.mpData->mbPreferredUseImagesInMenus) &&
          (mpData->mnSkipDisabledInMenus		== rSet.mpData->mnSkipDisabledInMenus)		&&
          (mpData->maFontColor				== rSet.mpData->maFontColor ))
         return TRUE;
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 5ca3223..0121be9 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3605,7 +3605,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
     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.SetPreferredUseImagesInMenus( showmenuicons );
 
     // set scrollbar settings
     gint slider_width = 14;


More information about the ooo-build-commit mailing list