[GME-commit] GMESRC/GME/Gme GMEApp.cpp, 1.144, 1.145 GMEApp.h, 1.38, 1.39

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Thu Sep 27 07:29:04 CDT 2007


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

Modified Files:
	GMEApp.cpp GMEApp.h 
Log Message:
Autosave allowed for MGX also.
Emergency event has sligthly different message in case of MGX, and there is no special backup file created.


CVS User: Zoltan Molnar, ISIS (zolmol)

Index: GMEApp.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEApp.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** GMEApp.h	2 Jun 2007 15:30:54 -0000	1.38
--- GMEApp.h	27 Sep 2007 12:29:02 -0000	1.39
***************
*** 65,68 ****
--- 65,69 ----
  	CRecentConnStrList m_RecentProjectList;
  	bool bNoProtect;   // do not catch application errors
+ 	inline bool isMultiUserProj() const { return proj_type_is_xmlbackend; }
  private:
  	
***************
*** 71,75 ****
  	void EmergencySave();
  	bool proj_type_is_mga;
!     bool proj_type_is_xmlbackend;
  	bool abort_on_close;
  	CString currentConnection;
--- 72,76 ----
  	void EmergencySave();
  	bool proj_type_is_mga;
! 	bool proj_type_is_xmlbackend;
  	bool abort_on_close;
  	CString currentConnection;

Index: GMEApp.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEApp.cpp,v
retrieving revision 1.144
retrieving revision 1.145
diff -C2 -d -r1.144 -r1.145
*** GMEApp.cpp	2 Jun 2007 15:30:54 -0000	1.144
--- GMEApp.cpp	27 Sep 2007 12:29:02 -0000	1.145
***************
*** 406,416 ****
  		HRESULT hr = mgaProject->Save(PutInBstr(embackupname), VARIANT_TRUE);
  #pragma warning(default: 4310) // cast truncates constant value
  		{
  			char buf[200];
  			sprintf(buf, "Emergency event. Your current work %s been saved to %s.\nThe original project file has not been modified.\nWe apologize for the inconvenience.", (hr == S_OK)? "has" : "may have", embackupname);
  			AfxMessageBox(buf);
  		}
- 		m_RecentProjectList.Add(embackupname);
- 		m_RecentProjectList.WriteList();
  	}
  	else AfxMessageBox("Emergency event. Please, restart GME.");
--- 406,422 ----
  		HRESULT hr = mgaProject->Save(PutInBstr(embackupname), VARIANT_TRUE);
  #pragma warning(default: 4310) // cast truncates constant value
+ 		if( proj_type_is_xmlbackend) 
+ 		{
+ 			AfxMessageBox("Emergency event. Please, restart GME. Your current work is found in the local checkout directory.");
+ 		}
+ 		else 
  		{
  			char buf[200];
  			sprintf(buf, "Emergency event. Your current work %s been saved to %s.\nThe original project file has not been modified.\nWe apologize for the inconvenience.", (hr == S_OK)? "has" : "may have", embackupname);
  			AfxMessageBox(buf);
+ 
+ 			m_RecentProjectList.Add(embackupname);
+ 			m_RecentProjectList.WriteList();
  		}
  	}
  	else AfxMessageBox("Emergency event. Please, restart GME.");
***************
*** 443,447 ****
  {
  
! 	if(mgaProject == NULL || (!proj_type_is_mga) || (!autosaveEnabled)) {
  		// The KillTimer function does not remove WM_TIMER messages 
  		// already posted to the message queue ...
--- 449,453 ----
  {
  
! 	if(mgaProject == NULL || (0&&!proj_type_is_mga) || (!autosaveEnabled)) {
  		// The KillTimer function does not remove WM_TIMER messages 
  		// already posted to the message queue ...
***************
*** 461,464 ****
--- 467,474 ----
  		conn = currentConnection + GME_AUTOSAVE_EXTENSION;
  	}
+ 
+ 	// autosave in case of xmlbackend means saving into the sourcecontrol
+ 	if( proj_type_is_xmlbackend)
+ 		conn = currentConnection;
  
  	// Check if in transaction



More information about the GME-commit mailing list