[commit] r1438 - trunk/GME/Gme

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Tue Jul 26 11:04:45 CDT 2011


Author: ksmyth
Date: Tue Jul 26 11:04:45 2011
New Revision: 1438

Log:
Remove ODBC, database GUI elements

Modified:
   trunk/GME/Gme/GME.rc
   trunk/GME/Gme/MgaOpenDlg.cpp
   trunk/GME/Gme/resource.h

Modified: trunk/GME/Gme/GME.rc
==============================================================================
--- trunk/GME/Gme/GME.rc	Tue Jul 26 11:01:35 2011	(r1437)
+++ trunk/GME/Gme/GME.rc	Tue Jul 26 11:04:45 2011	(r1438)
@@ -766,11 +766,9 @@
     DEFPUSHBUTTON   "&Next >",IDC_NEXT,52,52,46,14
     PUSHBUTTON      "Cancel",IDCANCEL,114,52,46,14
     PUSHBUTTON      "< &Back",IDC_BACK,7,52,46,14,WS_DISABLED
-    CONTROL         "Connect to database",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE | WS_DISABLED | WS_GROUP | WS_TABSTOP,58,1,102,10
-    CONTROL         "Open project file",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,58,18,102,10
-    CONTROL         "Open ODBC data",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,58,6,102,10
-    CONTROL         "Open multi user project",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,58,32,102,10
-    CONTROL         156,IDC_METAOPEN_BMP,"Static",SS_BITMAP,15,8,43,39
+    CONTROL         "Open project file",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP,58,18,102,10
+    CONTROL         "Open multi-user project",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,58,32,102,10
+    CONTROL         156,IDC_METAOPEN_BMP,"Static",SS_BITMAP,19,8,43,39
     CONTROL         155,IDC_MGAOPEN_BMP,"Static",SS_BITMAP,7,8,43,39
 END
 
@@ -1084,10 +1082,10 @@
     BEGIN
         BLOCK "040904b0"
         BEGIN
-            VALUE "FileDescription", "GME MFC Application"
+            VALUE "FileDescription", "GME"
             VALUE "FileVersion", "1, 0, 0, 1"
             VALUE "InternalName", "GME"
-            VALUE "LegalCopyright", "Copyright (C) 1999"
+            VALUE "LegalCopyright", "Copyright (C) 1999-2011 ISIS, Vanderbilt University"
             VALUE "OriginalFilename", "GME.EXE"
             VALUE "ProductName", "GME Application"
             VALUE "ProductVersion", "1, 0, 0, 1"

Modified: trunk/GME/Gme/MgaOpenDlg.cpp
==============================================================================
--- trunk/GME/Gme/MgaOpenDlg.cpp	Tue Jul 26 11:01:35 2011	(r1437)
+++ trunk/GME/Gme/MgaOpenDlg.cpp	Tue Jul 26 11:04:45 2011	(r1438)
@@ -21,7 +21,7 @@
 	: CDialog(CMgaOpenDlg::IDD, pParent)
 {
 	//{{AFX_DATA_INIT(CMgaOpenDlg)
-	m_radio = 1;
+	m_radio = 0;
 	//}}AFX_DATA_INIT
 
 	switch (dType){
@@ -143,26 +143,9 @@
 
 	try
 	{
-		if( (allowXme && (m_radio = 1)) || (DoModal() == IDOK && !pressed_back) )
+		if( (allowXme && (m_radio = 0)) || (DoModal() == IDOK && !pressed_back) )
 		{
-			if( m_radio == 0 || m_radio == 2)
-			{
-				CDatabase db;
-				
-				CString hint = fileNameHint;
-				int pos = hint.ReverseFind('\\');
-				if(pos >= 0) hint = hint.Mid(pos+1);
-				pos = hint.Find('.');
-				if(pos >= 0) hint = hint.Left(pos);
-
-				if( db.OpenEx(_T("DSN=")+hint, CDatabase::forceOdbcDialog) ) {
-					conn.Empty();
-					if(m_radio == 2) conn = _T("ODBC;");
-					conn += PruneConnectionString(db.GetConnect());
-				}
-				db.Close();
-			}
-			else if( m_radio == 1 )
+			if( m_radio == 0 )
 			{
 				CFileDialog dlg(true, NULL, fileNameHint.IsEmpty() ? NULL : (LPCTSTR)fileNameHint,
 					OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT |
@@ -181,13 +164,11 @@
 						conn = CString(_T("MGX=")) + dlg.GetPathName();
 					else if( (ext == _T("xml")) || (ext == _T("xme")) || (ext == _T("xmp")) )
 						conn = CString(_T("XML=")) + dlg.GetPathName();
-					else if( ext == _T("mdb") )
-						conn = CString(_T("DBQ=")) + dlg.GetPathName();
 					else if( ext == _T("") )
 					{
 						switch( dlg.m_ofn.nFilterIndex )
 						{
-						case 4:
+						case 3:
 						case 1:
 							conn = CString(_T("MGA=")) + dlg.GetPathName() + _T(".mga");
 							break;
@@ -195,17 +176,13 @@
 						case 2:
 							conn = CString(_T("XML=")) + dlg.GetPathName() + _T(".xme");
 							break;
-
-						case 3:
-							conn = CString(_T("DBQ=")) + dlg.GetPathName() + _T(".mdb");
-							break;
 						}
 					}
 					else
 					{
 						switch( dlg.m_ofn.nFilterIndex )
 						{
-						case 4:
+						case 3:
 						case 1:
 							conn = CString(_T("MGA=")) + dlg.GetPathName();
 							break;
@@ -213,15 +190,11 @@
 						case 2:
 							conn = CString(_T("XML=")) + dlg.GetPathName();
 							break;
-
-						case 3:
-							conn = CString(_T("DBQ=")) + dlg.GetPathName();
-							break;
 						}
 					}
 				}
 			}
-            else if( m_radio == 3 )
+            else if( m_radio == 1 )
             {
                 if( flag_create )
                 {
@@ -332,7 +305,7 @@
 {
 	CDialog::DoDataExchange(pDX);
 	//{{AFX_DATA_MAP(CMgaOpenDlg)
-	DDX_Radio(pDX, IDC_RADIO1, m_radio);
+	DDX_Radio(pDX, IDC_RADIO2, m_radio);
 	//}}AFX_DATA_MAP
 }
 

Modified: trunk/GME/Gme/resource.h
==============================================================================
--- trunk/GME/Gme/resource.h	Tue Jul 26 11:01:35 2011	(r1437)
+++ trunk/GME/Gme/resource.h	Tue Jul 26 11:04:45 2011	(r1438)
@@ -127,9 +127,7 @@
 #define IDC_METAID                      1023
 #define IDC_SEARCHBOX                   1024
 #define IDC_DEPENDENCY                  1025
-#define IDC_RADIO1                      1026
 #define IDC_RADIO2                      1027
-#define IDC_RADIO3                      1028
 #define IDC_RADIO4                      1029
 #define IDC_CONNTYPE                    1035
 #define IDC_CONNID                      1038


More information about the gme-commit mailing list