src/main.cpp

changeset 26
9aab482c9125
parent 20
a5457405cc9b
child 30
6b82f6a3ad53
--- a/src/main.cpp	Sun Sep 08 19:56:11 2013 +0300
+++ b/src/main.cpp	Sun Sep 08 21:02:10 2013 +0300
@@ -20,6 +20,7 @@
 #include "config.h"
 #include "types.h"
 #include "demo.h"
+#include "prompts.h"
 
 // =============================================================================
 // -----------------------------------------------------------------------------
@@ -41,9 +42,11 @@
 	}
 	
 	if (argc != 2) {
-		fprint (stderr, "Usage: %1 <demo>   - Launch a demo file\n", argv[0]);
-		fprint (stderr, "       %1 --config - Configure " APPNAME "\n", argv[0]);
-		return 255;
+		FindFilePrompt* dlg = new FindFilePrompt (null);
+		if (!dlg->exec())
+			return 255;
+		
+		return launchDemo (dlg->path());
 	}
 	
 	return launchDemo (argv[1]);
@@ -73,3 +76,7 @@
 	
 	return text;
 }
+
+QString versionSignature() {
+	return QString (APPNAME) + " " + versionString();
+}
\ No newline at end of file

mercurial