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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 1430
Date       : Tue Jul 11 14:33:52 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/main.cpp
   M /Trunk/XaraLX/wxOil/xrc/EN/camelot-strings.xrc

Use a default error message if there isn't one setup during an init fail


Diff:
Index: Trunk/XaraLX/Kernel/main.cpp
===================================================================
--- Trunk/XaraLX/Kernel/main.cpp	(revision 1429)
+++ Trunk/XaraLX/Kernel/main.cpp	(revision 1430)
@@ -161,21 +161,22 @@
 
 BOOL InitKernel()
 {
-	if (InitPreTools() &&
-	
-		Tool::InitTools() &&			   	// Init Modules and tools (keep last) 
+	bool	fSuccess = true;
+	if( !InitPreTools() ||
+		!Tool::InitTools() ||			   	// Init Modules and tools (keep last) 
+		!InitPostTools1() ||
+		!InitPostTools2()
+		)
+	{
+		if( 0 == Error::GetErrorNumber() )
+			Error::SetError( _R(IDS_INITIALISATION_ERROR) );
 
-		InitPostTools1() &&
-		InitPostTools2()
-
-		)					
-		return TRUE;
-	else
-	{
 		InformError();
 		TRACE( _T("InitKernel failed - will exit very soon
"));
-		return FALSE;
+		fSuccess = false;
 	}
+
+	return fSuccess;
 }
 
 /*******************************************************************
Index: Trunk/XaraLX/wxOil/xrc/EN/camelot-strings.xrc
===================================================================
--- Trunk/XaraLX/wxOil/xrc/EN/camelot-strings.xrc	(revision 1429)
+++ Trunk/XaraLX/wxOil/xrc/EN/camelot-strings.xrc	(revision 1430)
@@ -418,6 +418,12 @@
 					<label>Arrange windows as non-overlapping tiles</label>
 				</object>
 			</object>
+			<object class="sizeritem">
+				<flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
+				<object class="wxStaticText" name="IDS_INITIALISATION_ERROR">
+					<label>A sub-system has failed to initialise correctly, without correctly reporting an error. The application will now close-down.</label>
+				</object>
+			</object>
 		</object>
 	</object>
 </resource>


Xara