ooo-build r12114 - in trunk: . patches/src680



Author: ccheney
Date: Sun Apr  6 00:35:09 2008
New Revision: 12114
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12114&view=rev

Log:
2008-04-05  Chris Cheney <ccheney ubuntu com>

        * patches/src680/human-icons-add.diff: Correct patch to properly
          fallback to default (human) icon set if others don't exist on disk.



Modified:
   trunk/ChangeLog
   trunk/patches/src680/human-icons-add.diff

Modified: trunk/patches/src680/human-icons-add.diff
==============================================================================
--- trunk/patches/src680/human-icons-add.diff	(original)
+++ trunk/patches/src680/human-icons-add.diff	Sun Apr  6 00:35:09 2008
@@ -95,8 +95,8 @@
  
  #define STYLE_CURSOR_NOBLINKTIME    ((ULONG)0xFFFFFFFF)
  
---- vcl/source/app/settings.cxx.old	2007-08-04 03:38:19.000000000 -0500
-+++ vcl/source/app/settings.cxx	2007-08-04 03:43:37.000000000 -0500
+--- vcl/source/app/settings.cxx.orig	2008-04-03 23:58:54.000000000 -0500
++++ vcl/source/app/settings.cxx	2008-04-05 18:11:50.000000000 -0500
 @@ -84,6 +84,11 @@
  #include <tools/postwin.h>
  #endif
@@ -126,19 +126,14 @@
  
  	return STYLE_SYMBOLS_AUTO;
  }
-@@ -773,11 +781,34 @@
+@@ -773,22 +781,46 @@
  
  // -----------------------------------------------------------------------
  
-+static ULONG _checked_style = 99;
-+
- ULONG StyleSettings::GetCurrentSymbolsStyle() const
- {
- 	// style selected in Tools -> Options... -> OpenOffice.org -> View
- 	ULONG nStyle = GetSymbolsStyle();
- 
++ULONG SymbolsStyleOrAuto (ULONG nStyle)
++{
 +	// if the images*.zip file doesn't exist, fall back to auto
-+	if ( nStyle != STYLE_SYMBOLS_AUTO && _checked_style != nStyle )
++	if ( nStyle != STYLE_SYMBOLS_AUTO )
 +	{
 +		char zipfile[100] = "/usr/lib/openoffice/share/config/images";
 +		switch ( nStyle )
@@ -152,16 +147,25 @@
 +		}
 +		strcat (zipfile, ".zip");
 +		if ( access( zipfile, R_OK ) )
-+		{
-+			_checked_style = nStyle;
 +			nStyle = STYLE_SYMBOLS_AUTO;
-+		}
 +	}
++	return nStyle;
++}
 +
+ ULONG StyleSettings::GetCurrentSymbolsStyle() const
+ {
+ 	// style selected in Tools -> Options... -> OpenOffice.org -> View
+ 	ULONG nStyle = GetSymbolsStyle();
++	nStyle = SymbolsStyleOrAuto(nStyle);
+ 
  	if ( nStyle == STYLE_SYMBOLS_AUTO )
  	{
  		// the preferred style can be read from the desktop setting by the desktop native widgets modules
-@@ -788,7 +819,7 @@
+ 		ULONG nPreferredStyle = GetPreferredSymbolsStyle();
++		nPreferredStyle = SymbolsStyleOrAuto(nPreferredStyle);
+ 		
+ 		if ( nPreferredStyle == STYLE_SYMBOLS_AUTO )
+ 		{
  		
  			// use a hardcoded desktop-specific fallback if no preferred style has been detected
  			static bool sbFallbackDesktopChecked = false;
@@ -170,7 +174,7 @@
  
  			if ( !sbFallbackDesktopChecked )
  			{
-@@ -796,7 +827,7 @@
+@@ -796,7 +828,7 @@
  
  				if( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "gnome" ) ||
  				    rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "windows" ) )



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]