[GME-commit] GMESRC/GME/Gme GMEApp.cpp,1.109,1.110 GMEVersion.h,1.9,1.10 MgaOpenDlg.cpp,1.10,1.11 MgaOpenDlg.h,1.3,1.4

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Fri Mar 12 13:57:09 CST 2004


Update of /var/lib/gme/GMESRC/GME/Gme
In directory braindrain:/tmp/cvs-serv16042/Gme

Modified Files:
	GMEApp.cpp GMEVersion.h MgaOpenDlg.cpp MgaOpenDlg.h 
Log Message:
Open and save dialogs are cleaned in the GUI.

CVS User: volgy

Index: GMEApp.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GMEApp.cpp,v
retrieving revision 1.109
retrieving revision 1.110
diff -C2 -d -r1.109 -r1.110
*** GMEApp.cpp	9 Mar 2004 21:18:55 -0000	1.109
--- GMEApp.cpp	12 Mar 2004 19:57:06 -0000	1.110
***************
*** 1272,1277 ****
  void CGMEApp::OnFileOpen() 
  {
! 	CMgaOpenDlg dlg;
! 	dlg.title = "Open";
  	CString conn = dlg.AskConnectionString(false);
  
--- 1272,1276 ----
  void CGMEApp::OnFileOpen() 
  {
! 	CMgaOpenDlg dlg(CMgaOpenDlg::OpenDialog);
  	CString conn = dlg.AskConnectionString(false);
  
***************
*** 1324,1328 ****
  		CString metaname;
  		CString dataconn;
! 		CMgaOpenDlg dlg;
  
  		CComObjPtr<IMgaLauncher> launcher;
--- 1323,1327 ----
  		CString metaname;
  		CString dataconn;
! 		CMgaOpenDlg dlg(CMgaOpenDlg::NewDialog);
  
  		CComObjPtr<IMgaLauncher> launcher;
***************
*** 1338,1346 ****
  		COMTHROW( launcher->get_ParadigmName(PutOut(metaname)) );
  
- 		dlg.title = "New";
- 		dlg.filemsg = "Create project file";
- 		dlg.flag_back = true;
- 		dlg.flag_create = true;
- 		dlg.flag_meta = false;
  		dataconn = dlg.AskConnectionString(false);
  
--- 1337,1340 ----
***************
*** 1418,1423 ****
  
  void CGMEApp::OnFileSaveAs() {
! 	CMgaOpenDlg dlg;
! 	dlg.title = "Save As";
  	CString conn = dlg.AskMGAConnectionString();
  
--- 1412,1416 ----
  
  void CGMEApp::OnFileSaveAs() {
! 	CMgaOpenDlg dlg(CMgaOpenDlg::SaveAsDialog);
  	CString conn = dlg.AskMGAConnectionString();
  
***************
*** 1533,1543 ****
  	   COMTHROW( parser->GetXMLInfo(PutInBstr(dlg.GetPathName()), PutOut(paradigm),&parguid, PutOut(basename)) );
  
! 	   CMgaOpenDlg opdlg;
  	   opdlg.filenamehint = basename;
- 	   opdlg.title = "Import to new project";
- 	   opdlg.filemsg = "Create project file";
- 	   opdlg.flag_back = false;
- 	   opdlg.flag_create = true;
- 	   opdlg.flag_meta = false;
  	   dataconn = opdlg.AskConnectionString(false);
  	   if (dataconn.IsEmpty()) {
--- 1526,1531 ----
  	   COMTHROW( parser->GetXMLInfo(PutInBstr(dlg.GetPathName()), PutOut(paradigm),&parguid, PutOut(basename)) );
  
! 	   CMgaOpenDlg opdlg(CMgaOpenDlg::ImportDialog);
  	   opdlg.filenamehint = basename;
  	   dataconn = opdlg.AskConnectionString(false);
  	   if (dataconn.IsEmpty()) {
***************
*** 1835,1840 ****
  	MSGTRY
  	{
! 		CMgaOpenDlg dlg;
! 		dlg.title = "Select project";
  		CString conn = dlg.AskConnectionString(false);
  
--- 1823,1827 ----
  	MSGTRY
  	{
! 		CMgaOpenDlg dlg(CMgaOpenDlg::ClearLocksDialog);
  		CString conn = dlg.AskConnectionString(false);
  

Index: GMEVersion.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GMEVersion.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** GMEVersion.h	11 Mar 2004 17:25:39 -0000	1.9
--- GMEVersion.h	12 Mar 2004 19:57:06 -0000	1.10
***************
*** 4,8 ****
  #define GME_VERSION_MAJOR	4		// MAJOR = Last two digits of Year
  #define GME_VERSION_MINOR	3		// MINOR = Month
! #define GME_VERSION_PLEVEL	11		// PATCH LEVEL = Day
  
  #define _VERSION_STRING2(x)	#x 
--- 4,8 ----
  #define GME_VERSION_MAJOR	4		// MAJOR = Last two digits of Year
  #define GME_VERSION_MINOR	3		// MINOR = Month
! #define GME_VERSION_PLEVEL	12		// PATCH LEVEL = Day
  
  #define _VERSION_STRING2(x)	#x 

Index: MgaOpenDlg.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/MgaOpenDlg.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** MgaOpenDlg.cpp	25 Sep 2003 08:40:38 -0000	1.10
--- MgaOpenDlg.cpp	12 Mar 2004 19:57:06 -0000	1.11
***************
*** 17,21 ****
  
  
! CMgaOpenDlg::CMgaOpenDlg(CWnd* pParent /*=NULL*/)
  	: CDialog(CMgaOpenDlg::IDD, pParent)
  {
--- 17,21 ----
  
  
! CMgaOpenDlg::CMgaOpenDlg(DialogTypes dType, CWnd* pParent /*=NULL*/)
  	: CDialog(CMgaOpenDlg::IDD, pParent)
  {
***************
*** 24,32 ****
  	//}}AFX_DATA_INIT
  
! 	title = "Open";
! 	filemsg = "Open project file";
! 	flag_back = false;
! 	flag_create = false;
! 	flag_meta = false;
  }
  
--- 24,79 ----
  	//}}AFX_DATA_INIT
  
! 	switch (dType){
! 	case OpenDialog:
! 		title = "Open";
! 		filemsg = "Open project file";
! 		flag_isopen = true;
! 		flag_back = false;
! 		flag_create = false;
! 		flag_meta = false;
! 		break;
! 	case SaveDialog:
! 		title = "Save";
! 		filemsg = "Save project file";
! 		flag_isopen = false;
! 		flag_back = false;
! 		flag_create = false;
! 		flag_meta = false;
! 		break;
! 	case SaveAsDialog:
! 		title = "Save As";
! 		filemsg = "Save project file";
! 		flag_isopen = false;
! 		flag_back = false;
! 		flag_create = false;
! 		flag_meta = false;
! 		break;
! 	case NewDialog:
! 		title = "New";
! 		filemsg = "Create project file";
! 		flag_isopen = true;
! 		flag_back = true;
! 		flag_create = true;
! 		flag_meta = false;
! 		break;
! 	case ImportDialog:
! 		title = "Import to new project";
! 		filemsg = "Create project file";
! 		flag_isopen = true;
! 		flag_back = false;
! 		flag_create = true;
! 		flag_meta = false;
! 		break;
! 	case ClearLocksDialog:
! 		title = "Select project";
! 		filemsg = "Open project file";
! 		flag_isopen = true;
! 		flag_back = false;
! 		flag_create = false;
! 		flag_meta = false;
! 		break;
! 	}
! 
! 	
  }
  
***************
*** 42,46 ****
  CString CMgaOpenDlg::AskMGAConnectionString() {
  		CString conn;
! 		CFileDialog dlg(true, NULL, NULL, 
  				OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | 
  				0, mgaonlyfilter);
--- 89,93 ----
  CString CMgaOpenDlg::AskMGAConnectionString() {
  		CString conn;
! 		CFileDialog dlg(flag_isopen ? TRUE : FALSE, NULL, NULL, 
  				OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | 
  				0, mgaonlyfilter);

Index: MgaOpenDlg.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/MgaOpenDlg.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MgaOpenDlg.h	28 Mar 2001 18:56:00 -0000	1.3
--- MgaOpenDlg.h	12 Mar 2004 19:57:06 -0000	1.4
***************
*** 8,11 ****
--- 8,12 ----
  //
  
+ 
  /////////////////////////////////////////////////////////////////////////////
  // CMgaOpenDlg dialog
***************
*** 13,25 ****
  class CMgaOpenDlg : public CDialog
  {
  // Construction
  public:
! 	CMgaOpenDlg(CWnd* pParent = NULL);   // standard constructor
  
- 	bool flag_back;
- 	bool flag_create;
- 	bool flag_meta;
- 	CString title;
- 	CString filemsg;
  	CString filenamehint;
  
--- 14,30 ----
  class CMgaOpenDlg : public CDialog
  {
+ public:
+ 	enum DialogTypes {
+ 		OpenDialog,
+ 		SaveDialog,
+ 		SaveAsDialog,
+ 		NewDialog,
+ 		ImportDialog,
+ 		ClearLocksDialog
+ 	};
  // Construction
  public:
! 	CMgaOpenDlg(DialogTypes dType = OpenDialog, CWnd* pParent = NULL);   // standard constructor
  
  	CString filenamehint;
  
***************
*** 46,49 ****
--- 51,61 ----
  // Implementation
  protected:
+ 
+ 	BOOL flag_isopen;
+ 	bool flag_back;
+ 	bool flag_create;
+ 	bool flag_meta;
+ 	CString title;
+ 	CString filemsg;
  
  	// Generated message map functions



More information about the GME-commit mailing list