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

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1691
Date       : Thu Aug 10 14:54:32 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/camelot.cpp
   M /Trunk/XaraLX/wxOil/camelot.h

Hopefully fix bz1427, not finding resources.


Diff:
Index: Trunk/XaraLX/wxOil/camelot.h
===================================================================
--- Trunk/XaraLX/wxOil/camelot.h	(revision 1690)
+++ Trunk/XaraLX/wxOil/camelot.h	(revision 1691)
@@ -166,6 +166,7 @@
 
 	static wxString		m_strResourcePath;		// The usually bound in resources
 	static String_256	m_strResourceDirPath;	// External resources (i.e. help files)
+	static String_256	m_strResourceDirPathOverride;	// Version in preference file
 
 	wxTimer				m_Timer;
 
Index: Trunk/XaraLX/wxOil/camelot.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camelot.cpp	(revision 1690)
+++ Trunk/XaraLX/wxOil/camelot.cpp	(revision 1691)
@@ -231,8 +231,8 @@
 bool					CCamApp::s_bIsDisabled = false; // Initially system is not disabled.
 wxString				CCamApp::m_strResourcePath;
 String_256				CCamApp::m_strResourceDirPath;
+String_256				CCamApp::m_strResourceDirPathOverride;
 
-
 /***************************************************************************************************************************/
 
 CCamApp::CCamApp()
@@ -797,8 +797,9 @@
 	}
 
 	// Check the resource dir exists
-	Camelot.DeclarePref( NULL, TEXT("ResourceDir"), &m_strResourceDirPath );
-	if( bFirstRun || m_strResourceDirPath == _T("") || !wxDir::Exists( (PCTSTR)m_strResourceDirPath ) )
+	Camelot.DeclarePref( NULL, TEXT("ResourceDir"), &m_strResourceDirPathOverride );
+	m_strResourceDirPath = m_strResourceDirPathOverride; // this way, the path we find never gets put within the preferences
+	if( /*bFirstRun ||*/ m_strResourceDirPath == _T("") || !wxDir::Exists( (PCTSTR)m_strResourceDirPath ) ) // AB: don't need to do this on first run especially
 	{
 #if !defined(RESOURCE_DIR)
 		// we can't use auto pointers here because they free using delete but BR allocates using malloc (strdup actually)


Xara