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

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1184
Date       : Tue May 23 20:27:20 BST 2006

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

Make splash screen disappear immediate another window (e.g. a wxMessageBox) is created


Diff:
Index: Trunk/XaraLX/wxOil/camresource.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camresource.cpp	(revision 1183)
+++ Trunk/XaraLX/wxOil/camresource.cpp	(revision 1184)
@@ -1785,7 +1785,7 @@
 
 /********************************************************************************************
 
->	static BOOL CamResource::DoneInit()
+>	static BOOL CamResource::DoneInit(BOOL CanYield=TRUE)
 
 
 	Author:		Alex_Bligh <alex@xxxxxxxxxxx>
@@ -1800,16 +1800,18 @@
 
 ********************************************************************************************/
 
-BOOL CamResource::DoneInit()
+BOOL CamResource::DoneInit(BOOL CanYield /*=TRUE*/)
 {
 	TRACET(_T("CamResource::DoneInit() called"));
 #if !defined(EXCLUDE_FROM_XARLIB)
 	if (pSplashScreen)
 	{
-        ::wxYield();
+        if (CanYield)
+			::wxYield();
 		pSplashScreen->Destroy();
 		pSplashScreen = NULL;
-        ::wxYield();
+		if (CanYield)
+	        ::wxYield();
 	}
 	if (pSplashBitmap)
 	{
Index: Trunk/XaraLX/wxOil/camresource.h
===================================================================
--- Trunk/XaraLX/wxOil/camresource.h	(revision 1183)
+++ Trunk/XaraLX/wxOil/camresource.h	(revision 1184)
@@ -325,7 +325,7 @@
 	static BOOL Init();
 	static BOOL DeInit();
 
-	static BOOL DoneInit();
+	static BOOL DoneInit(BOOL CanYield=TRUE);
 
 	static wxLocale * GetLocale() {return m_pLocale;}
 
Index: Trunk/XaraLX/wxOil/camelot.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camelot.cpp	(revision 1183)
+++ Trunk/XaraLX/wxOil/camelot.cpp	(revision 1184)
@@ -256,6 +256,12 @@
 {
 	static INT32	lLastTimeStamp = 0;
 
+	if (( event.GetEventType() == wxEVT_CREATE ) && (event.GetEventObject()->IsKindOf(CLASSINFO(wxTopLevelWindow))))
+	{
+		// a top level window is about to be created. End the splash screen if it is up as it may obscure it
+		CamResource::DoneInit(FALSE);	
+	}
+
 #if defined(_DEBUG)
 	if( event.GetEventType() == wxEVT_CHAR )
 	{


Xara