[commit] r1552 - tags/Release_11.9.20/GME/Gme

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Tue Sep 20 10:16:54 CDT 2011


Author: ksmyth
Date: Tue Sep 20 10:16:54 2011
New Revision: 1552

Log:
Merge r1549

Modified:
   tags/Release_11.9.20/GME/Gme/GMEApp.cpp
   tags/Release_11.9.20/GME/Gme/GMEOLEApp.cpp
   tags/Release_11.9.20/GME/Gme/MainFrm.cpp

Modified: tags/Release_11.9.20/GME/Gme/GMEApp.cpp
==============================================================================
--- tags/Release_11.9.20/GME/Gme/GMEApp.cpp	Tue Sep 20 10:13:38 2011	(r1551)
+++ tags/Release_11.9.20/GME/Gme/GMEApp.cpp	Tue Sep 20 10:16:54 2011	(r1552)
@@ -1751,6 +1751,13 @@
 {
 	// Focus must be killed to flush ObjectInspector and Browser
 	::SetFocus(NULL);
+#ifdef _DEBUG
+	if (SaveAllModified())
+	{
+		CWinAppEx::OnAppExit();
+		return;
+	}
+#else
 	if (SaveAllModified())
 	{
 		// n.b. C# interpreters may not Release() IGMEOLEApp, which keeps us ::Run()ing forever
@@ -1758,6 +1765,7 @@
 		TerminateProcess(GetCurrentProcess(), 0);
 	}
 	// n.b. don't call CWinAppEx::OnAppExit
+#endif
 }
 
 BOOL CGMEApp::SaveAllModified() 

Modified: tags/Release_11.9.20/GME/Gme/GMEOLEApp.cpp
==============================================================================
--- tags/Release_11.9.20/GME/Gme/GMEOLEApp.cpp	Tue Sep 20 10:13:38 2011	(r1551)
+++ tags/Release_11.9.20/GME/Gme/GMEOLEApp.cpp	Tue Sep 20 10:16:54 2011	(r1552)
@@ -767,7 +767,10 @@
 
 void CGMEOLEApp::Exit()
 {
-	theApp.exit();
+	theApp.CloseProject(false);
+	// n.b. Post here, since this call could be out-of-proc, and it won't succeed 
+	// if TerminateProcess is called
+	CMainFrame::theInstance->PostMessage(WM_CLOSE, 0, 0);
 }
 
 long CGMEOLEApp::RefreshLib( LPCTSTR pLibName, BOOL pUngroup)

Modified: tags/Release_11.9.20/GME/Gme/MainFrm.cpp
==============================================================================
--- tags/Release_11.9.20/GME/Gme/MainFrm.cpp	Tue Sep 20 10:13:38 2011	(r1551)
+++ tags/Release_11.9.20/GME/Gme/MainFrm.cpp	Tue Sep 20 10:16:54 2011	(r1552)
@@ -224,8 +224,11 @@
 void CMainFrame::OnClose()
 {
 #ifdef _DEBUG
-	clearGmeOleApp();
-	CMDIFrameWndEx::OnClose();
+	if (theApp.SaveAllModified())
+	{
+		clearGmeOleApp();
+		CMDIFrameWndEx::OnClose();
+	}
 #else
 	theApp.OnAppExit();
 #endif


More information about the gme-commit mailing list