[GME-commit] GMESRC/GME/Gme GMEApp.cpp,1.124,1.125 GMEApp.h,1.25,1.26

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Tue Sep 14 10:02:19 CDT 2004


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

Modified Files:
	GMEApp.cpp GMEApp.h 
Log Message:
no message

CVS User: bogyom

Index: GMEApp.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GMEApp.cpp,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -d -r1.124 -r1.125
*** GMEApp.cpp	25 Aug 2004 20:36:31 -0000	1.124
--- GMEApp.cpp	14 Sep 2004 14:02:17 -0000	1.125
***************
*** 365,369 ****
  	
  	CGMEEventLogger::LogGMEEvent("EMERGENCY EVENT\r\n");
! 	if(mgaProject && proj_type_is_mga) {
  		CString embackupname = currentConnection;
  		int p = embackupname.ReverseFind('.');
--- 365,369 ----
  	
  	CGMEEventLogger::LogGMEEvent("EMERGENCY EVENT\r\n");
! 	if(mgaProject && (proj_type_is_mga||proj_type_is_xmlbackend)) {
  		CString embackupname = currentConnection;
  		int p = embackupname.ReverseFind('.');
***************
*** 538,541 ****
--- 538,542 ----
  		projectDir.Empty();
  		proj_type_is_mga = false;
+         proj_type_is_xmlbackend = false;
  		return;
  	}
***************
*** 562,566 ****
  		}
  		else proj_type_is_mga = false;
! 	}
  	if(!metaconn.IsEmpty()) {
  		if (metaconn.Find("MGA=") == 0) {
--- 563,572 ----
  		}
  		else proj_type_is_mga = false;
! 
!         if( conn.Find("MGX=") == 0 ) 
!             proj_type_is_xmlbackend = true;
!         else
!             proj_type_is_xmlbackend = false;
! 	}       
  	if(!metaconn.IsEmpty()) {
  		if (metaconn.Find("MGA=") == 0) {
***************
*** 1330,1334 ****
  BOOL CGMEApp::SaveAllModified() 
  {
! 	if(mgaProject != NULL && proj_type_is_mga) {
  		long l;
  		COMTHROW(mgaProject->get_ProjectStatus(&l));
--- 1336,1340 ----
  BOOL CGMEApp::SaveAllModified() 
  {
! 	if(mgaProject != NULL && (proj_type_is_mga||proj_type_is_xmlbackend)) {
  		long l;
  		COMTHROW(mgaProject->get_ProjectStatus(&l));
***************
*** 1388,1392 ****
  		CreateProject(metaname, dataconn);
  
! 		if (mgaProject != NULL && proj_type_is_mga) {
  			OnFileSave();
  		}
--- 1394,1398 ----
  		CreateProject(metaname, dataconn);
  
! 		if (mgaProject != NULL && (proj_type_is_mga||proj_type_is_xmlbackend)) {
  			OnFileSave();
  		}
***************
*** 1424,1428 ****
  // In case of an MGA file, try to save it first to find out 
  	abort_on_close = false;
! 	if(mgaProject != NULL && proj_type_is_mga) {
  		HRESULT hr = mgaProject->Save(NULL);
  		if(hr != S_OK) {
--- 1430,1434 ----
  // In case of an MGA file, try to save it first to find out 
  	abort_on_close = false;
! 	if(mgaProject != NULL && (proj_type_is_mga||proj_type_is_xmlbackend)) {
  		HRESULT hr = mgaProject->Save(NULL);
  		if(hr != S_OK) {
***************
*** 1682,1686 ****
  			COMTHROW(parser->ParseProject(theApp.mgaProject,PutInBstr(dlg.GetPathName())) );
  
! 			if(newproject && proj_type_is_mga) {
  				OnFileSave();
  			}
--- 1688,1692 ----
  			COMTHROW(parser->ParseProject(theApp.mgaProject,PutInBstr(dlg.GetPathName())) );
  
! 			if(newproject && (proj_type_is_mga||proj_type_is_xmlbackend)) {
  				OnFileSave();
  			}
***************
*** 2013,2017 ****
  void CGMEApp::OnUpdateFileSave(CCmdUI* pCmdUI) 
  {
! 	pCmdUI->Enable(mgaProject != NULL && proj_type_is_mga);
  }
  
--- 2019,2023 ----
  void CGMEApp::OnUpdateFileSave(CCmdUI* pCmdUI) 
  {
! 	pCmdUI->Enable(mgaProject != NULL && (proj_type_is_mga||proj_type_is_xmlbackend));
  }
  

Index: GMEApp.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GMEApp.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** GMEApp.h	25 Aug 2004 20:36:31 -0000	1.25
--- GMEApp.h	14 Sep 2004 14:02:17 -0000	1.26
***************
*** 67,70 ****
--- 67,71 ----
  	void EmergencySave();
  	bool proj_type_is_mga;
+     bool proj_type_is_xmlbackend;
  	bool abort_on_close;
  	CString currentConnection;



More information about the GME-commit mailing list