[commit] r2292 - in trunk/GME: CSGUI Gme

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Fri Aug 16 10:49:17 CDT 2013


Author: ksmyth
Date: Fri Aug 16 10:49:17 2013
New Revision: 2292

Log:
Allow opening .mgx from welcome screen

Modified:
   trunk/GME/CSGUI/WelcomeScreen.cs
   trunk/GME/Gme/GMEApp.cpp

Modified: trunk/GME/CSGUI/WelcomeScreen.cs
==============================================================================
--- trunk/GME/CSGUI/WelcomeScreen.cs	Fri Aug 16 10:48:55 2013	(r2291)
+++ trunk/GME/CSGUI/WelcomeScreen.cs	Fri Aug 16 10:49:17 2013	(r2292)
@@ -66,7 +66,7 @@
             {
                 OpenFileDialog openFileDialog1 = new OpenFileDialog();
                 //openFileDialog1.InitialDirectory =
-                openFileDialog1.Filter = "GME project files (*.mga,*.xme)|*.mga; *.xme|MGA files|*.mga|GME XML files|*.xme; *.xml|All files (*.*)|*.*";
+                openFileDialog1.Filter = "GME project files (*.mga,*.xme,*.mgx)|*.mga; *.xme; *.mgx|MGA files|*.mga|GME XML files|*.xme; *.xml|All files (*.*)|*.*";
                 openFileDialog1.RestoreDirectory = true;
                 openFileDialog1.CheckFileExists = true;
 

Modified: trunk/GME/Gme/GMEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEApp.cpp	Fri Aug 16 10:48:55 2013	(r2291)
+++ trunk/GME/Gme/GMEApp.cpp	Fri Aug 16 10:49:17 2013	(r2292)
@@ -571,6 +571,12 @@
 				if(conn.Find(_T("=")) < 0) {
 					if (conn.Right(4).CompareNoCase(_T(".xme")) == 0)
 						conn.Insert(0, _T("XML="));
+					else if (conn.Right(4).CompareNoCase(_T(".mgx")) == 0)
+					{
+						CString filename, dirname;
+						GetFullPathName(conn, filename, dirname);
+						conn = CString(L"MGX=\"") + dirname + L"\"";
+					}
 					else
 						conn.Insert(0,_T("MGA="));
 				}


More information about the gme-commit mailing list