[GME-commit] GMESRC/GME/Gme GMEApp.h, 1.36, 1.37 GMEApp.cpp, 1.142, 1.143

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Wed Mar 7 17:31:26 CST 2007


Update of /project/gme-repository/GMESRC/GME/Gme
In directory escher:/tmp/cvs-serv24228

Modified Files:
	GMEApp.h GMEApp.cpp 
Log Message:
Projectname updated correctly upon XML import.
Other minor things.



CVS User: Zoltan Molnar, ISIS (zolmol)

Index: GMEApp.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEApp.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** GMEApp.h	7 Dec 2006 19:07:40 -0000	1.36
--- GMEApp.h	7 Mar 2007 23:31:24 -0000	1.37
***************
*** 43,46 ****
--- 43,47 ----
  	virtual BOOL PreTranslateMessage(MSG* pMsg);
  	CGMEApp();
+ 	virtual ~CGMEApp();
  
  	CMultiDocTemplate* pDocTemplate;
***************
*** 81,84 ****
--- 82,86 ----
  	bool mouseOverNotify;
  	CString realFmtStr;
+ 	bool maintainHistory;
  
  	//
***************
*** 143,146 ****
--- 145,149 ----
  	CString getDefZoomLev() { return defZoomLev; }
  	inline bool isMouseOverNotifyEnabled() { return mouseOverNotify; }
+ 	inline bool isHistoryEnabled() { return maintainHistory; }
  	inline CString getRealFmtStr() { return realFmtStr; }
  

Index: GMEApp.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEApp.cpp,v
retrieving revision 1.142
retrieving revision 1.143
diff -C2 -d -r1.142 -r1.143
*** GMEApp.cpp	7 Dec 2006 21:51:22 -0000	1.142
--- GMEApp.cpp	7 Mar 2007 23:31:24 -0000	1.143
***************
*** 124,127 ****
--- 124,128 ----
  	defZoomLev = "100";
  	mouseOverNotify = false;
+ 	maintainHistory = false;
  	realFmtStr = "%.12g";
  	// TODO: add construction code here,
***************
*** 130,133 ****
--- 131,137 ----
  }
  
+ CGMEApp::~CGMEApp()
+ {
+ }
  
  class CGMECommandLineInfo : public CCommandLineInfo {
***************
*** 1284,1287 ****
--- 1288,1296 ----
  		if( bstr_fmt)
  			CopyTo( bstr_fmt, realFmtStr);
+ 
+ 		// History Maintained?
+ 		VARIANT_BOOL history_maintained;
+ 		COMTHROW( registrar->GetNavigation( REGACCESS_USER, &history_maintained));
+ 		maintainHistory = ( history_maintained != VARIANT_FALSE);
  	}
  	MSGCATCH("Error while trying to get program settings",;);
***************
*** 1594,1599 ****
  		COMTHROW( dumper->DumpProject(theApp.mgaProject,PutInBstr(dlg.GetPathName())) );
  
! 		//AfxMessageBox("The XML file was successfully exported.");
! 		CMainFrame::theInstance->m_console.Message( "The XML file was successfully exported.", 1);
  	}
  	MSGCATCH("Error while generating XML file",;)
--- 1603,1607 ----
  		COMTHROW( dumper->DumpProject(theApp.mgaProject,PutInBstr(dlg.GetPathName())) );
  
! 		if( CMainFrame::theInstance) CMainFrame::theInstance->m_console.Message( CString( "Project successfully exported into ") + dlg.GetPathName() + ".", 1);
  	}
  	MSGCATCH("Error while generating XML file",;)
***************
*** 1751,1755 ****
  			}
  
! 			UpdateProjectName();
  
  			CWaitCursor wait;
--- 1759,1763 ----
  			}
  
! 			//UpdateProjectName(); // moved below
  
  			CWaitCursor wait;
***************
*** 1759,1768 ****
  			file_name = dlg.GetPathName();
  			COMTHROW(parser->ParseProject(theApp.mgaProject,PutInBstr(dlg.GetPathName())) );
  
  			if(newproject && (proj_type_is_mga||proj_type_is_xmlbackend)) {
  				OnFileSave();
  			}
! 			//AfxMessageBox("The XML file was successfully imported.");
! 			CMainFrame::theInstance->m_console.Message( "The XML file was successfully imported.", 1);
  			keep_on = false;
  		}
--- 1767,1779 ----
  			file_name = dlg.GetPathName();
  			COMTHROW(parser->ParseProject(theApp.mgaProject,PutInBstr(dlg.GetPathName())) );
+ 			
+ 			// mgaproject has been filled with data, let's update title:
+ 			UpdateProjectName();
  
  			if(newproject && (proj_type_is_mga||proj_type_is_xmlbackend)) {
  				OnFileSave();
  			}
! 			if( CMainFrame::theInstance) CMainFrame::theInstance->m_console.Message( dlg.GetPathName() + " was successfully imported.", 1);
! 			else AfxMessageBox( dlg.GetPathName() + " was successfully imported.");
  			keep_on = false;
  		}
***************
*** 2454,2458 ****
  			}
  
! 			UpdateProjectName();
  
  			CWaitCursor wait;
--- 2465,2469 ----
  			}
  
! 			//UpdateProjectName(); // moved below
  
  			CWaitCursor wait;
***************
*** 2461,2470 ****
  			keep_on = true;
  			COMTHROW(parser->ParseProject(theApp.mgaProject,PutInBstr(file_name)) );
  
  			if(newproject && (proj_type_is_mga||proj_type_is_xmlbackend)) {
  				OnFileSave();
  			}
! 			CMainFrame *p = (CMainFrame *) this->m_pMainWnd;
! 			if(p) p->m_console.Message( file_name + " was successfully imported.", 1);
  			else AfxMessageBox(file_name + " was successfully imported.");
  			keep_on = false;
--- 2472,2484 ----
  			keep_on = true;
  			COMTHROW(parser->ParseProject(theApp.mgaProject,PutInBstr(file_name)) );
+ 			
+ 			// mgaproject has been filled with data, let's update title:
+ 			UpdateProjectName();
  
  			if(newproject && (proj_type_is_mga||proj_type_is_xmlbackend)) {
  				OnFileSave();
  			}
! 
! 			if( CMainFrame::theInstance) CMainFrame::theInstance->m_console.Message( file_name + " was successfully imported.", 1);
  			else AfxMessageBox(file_name + " was successfully imported.");
  			keep_on = false;



More information about the GME-commit mailing list