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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 1095
Date       : Wed May 17 10:54:25 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/camelot.cpp
   A /Trunk/XaraLX/wxOil/xrc/EN/help-strings.xrc

Add some error checking for the new help system


Diff:
Index: Trunk/XaraLX/wxOil/camelot.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camelot.cpp	(revision 1094)
+++ Trunk/XaraLX/wxOil/camelot.cpp	(revision 1095)
@@ -1261,15 +1261,24 @@
 		TRACEUSER( "jlh92", _T("Try = \"%s\"
"), PCTSTR(strHelpPath) );
 		if( !wxDir::Exists( strHelpPath ) )
 #endif
+		{
+			ERROR1RAW( _R(IDS_MISSING_HELPDIR) );
 			return;
+		}
 	}
 
-	TRACEUSER( "jlh92", _T("Final directory = \"%s\"
"), PCTSTR(strHelpPath) );
+	// Build full path
+	wxString	strUrl;
+	strUrl += strHelpPath;
+	strUrl += _T("xaralx.htm");
+	if( !wxFile::Exists( strUrl ) )
+	{
+		ERROR1RAW( _R(IDS_MISSING_HELPINDEX) );
+		return;
+	}
 
 	// Build the complete URL and launch browser
-	wxString	strUrl( _T("file://") );
-	strUrl += strHelpPath;
-	strUrl += _T("xaralx.htm");
+	strUrl.Prepend( _T("file://") );
 	wxLaunchDefaultBrowser( strUrl );
 }
 
Index: Trunk/XaraLX/wxOil/xrc/EN/help-strings.xrc
===================================================================
--- Trunk/XaraLX/wxOil/xrc/EN/help-strings.xrc	(revision 0)
+++ Trunk/XaraLX/wxOil/xrc/EN/help-strings.xrc	(revision 1095)
@@ -0,0 +1,21 @@
+<?xml version="1.0" ?>
+<resource>
+	<object class="wxDialog" name="STRINGTABLE_HELPRC">
+		<title>String table from HELPRC</title>
+		<object class="wxBoxSizer">
+			<orient>wxVERTICAL</orient>
+			<object class="sizeritem">
+				<flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
+				<object class="wxStaticText" name="IDS_MISSING_HELPDIR">
+					<label>The directory which contains the help file is not present, no help will be avialable.</label>
+				</object>
+			</object>
+			<object class="sizeritem">
+				<flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
+				<object class="wxStaticText" name="IDS_MISSING_HELPINDEX">
+					<label>The help index file is not present, unable to display the help index.</label>
+				</object>
+			</object>
+		</object>
+	</object>
+</resource>


Xara