[commit] r2138 - in trunk/GME: Gme Interfaces

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Thu Jan 10 14:31:38 CST 2013


Author: ksmyth
Date: Thu Jan 10 14:31:38 2013
New Revision: 2138

Log:
Add GLOBALEVENT_OPEN_PROJECT_FINISHED, to notify after project open and (possibly) xme import. META-417

Modified:
   trunk/GME/Gme/GMEApp.cpp
   trunk/GME/Interfaces/Mga.idl

Modified: trunk/GME/Gme/GMEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEApp.cpp	Thu Jan 10 14:31:10 2013	(r2137)
+++ trunk/GME/Gme/GMEApp.cpp	Thu Jan 10 14:31:38 2013	(r2138)
@@ -1563,6 +1563,8 @@
 			}	
 		}
 		AfterOpenOrCreateProject(conn);
+		hr = mgaProject->Notify(GLOBALEVENT_OPEN_PROJECT_FINISHED);
+		ASSERT(SUCCEEDED(hr));
 	}
 	MSGCATCH(_T("Could not open project"), CloseProject(true, true))
 	
@@ -1614,6 +1616,8 @@
 	    COMTHROW(hr);
 
 		AfterOpenOrCreateProject(conn);
+		hr = mgaProject->Notify(GLOBALEVENT_OPEN_PROJECT_FINISHED);
+		ASSERT(SUCCEEDED(hr));
 	}
 	MSGCATCH(_T("Could not create project"), CloseProject())
 }
@@ -2310,10 +2314,15 @@
 			OnFileSave();
 		}
 
-		if( CMainFrame::theInstance) CMainFrame::theInstance->m_console.Message( fullPath + _T(" was successfully imported."), 1);
-		else AfxMessageBox(fullPath + _T(" was successfully imported."));
+		if (CMainFrame::theInstance)
+			CMainFrame::theInstance->m_console.Message(fullPath + _T(" was successfully imported."), 1);
+		else
+			AfxMessageBox(fullPath + _T(" was successfully imported."));
 
-	if (mgaConstMgr) COMTHROW(mgaConstMgr->Enable(true));
+	if (mgaConstMgr)
+		COMTHROW(mgaConstMgr->Enable(true));
+	HRESULT hr = mgaProject->Notify(GLOBALEVENT_OPEN_PROJECT_FINISHED);
+	ASSERT(SUCCEEDED(hr));
 }
 
 

Modified: trunk/GME/Interfaces/Mga.idl
==============================================================================
--- trunk/GME/Interfaces/Mga.idl	Thu Jan 10 14:31:10 2013	(r2137)
+++ trunk/GME/Interfaces/Mga.idl	Thu Jan 10 14:31:38 2013	(r2138)
@@ -87,6 +87,7 @@
     GLOBALEVENT_REDO,
 	GLOBALEVENT_PROJECT_PROPERTIES,							// project properties Name, author, etc changed
 	GLOBALEVENT_NOTIFICATION_READY,
+	GLOBALEVENT_OPEN_PROJECT_FINISHED, // notification is sent after 1. File>New 2. File>Open 3. File>Import XML
 															// application specific (GUI) events
 	APPEVENT_XML_IMPORT_BEGIN = 0xFF,
 	APPEVENT_XML_IMPORT_END,


More information about the gme-commit mailing list