[commit] r1211 - trunk/GME/GMEActiveBrowser

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Mon Mar 21 14:16:00 CDT 2011


Author: ksmyth
Date: Mon Mar 21 14:16:00 2011
New Revision: 1211

Log:
Remove Undo, Redo from tree browser, they are not context sensitive, and there is enough clutter already

Modified:
   trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp
   trunk/GME/GMEActiveBrowser/AggregateContextMenu.h
   trunk/GME/GMEActiveBrowser/GMEActiveBrowser.rc
   trunk/GME/GMEActiveBrowser/resource.h

Modified: trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp	Wed Mar 16 15:45:48 2011	(r1210)
+++ trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp	Mon Mar 21 14:16:00 2011	(r1211)
@@ -78,8 +78,6 @@
 	{
 		switch(nSelectedID)
 		{
-			case ID_POPUP_EDIT_UNDO:	OnEditUndo();break;
-			case ID_POPUP_EDIT_REDO:	OnEditRedo();break;
 			case ID_EDIT_CUT:			OnEditCut();break;
 			case ID_EDIT_COPY:			OnEditCopy();break;
 			case ID_EDIT_COPYCLOSURE:	OnEditCopyClosure();break;
@@ -238,36 +236,6 @@
 
 }
 
-void CAggregateContextMenu::OnEditUndo()
-{
-	CGMEActiveBrowserApp* pApp=(CGMEActiveBrowserApp*)AfxGetApp();
-	CMgaContext* pMgaContext=&pApp->m_CurrentProject.m_MgaContext;
-	
-	short nRedoSize,nUndoSize;
-	pMgaContext->m_ccpProject->UndoRedoSize(&nUndoSize,&nRedoSize);
-
-	if(nUndoSize>0)
-	{
-		COMTHROW(pMgaContext->m_ccpProject->Undo());
-	}
-}
-
-void CAggregateContextMenu::OnEditRedo()
-{
-	CGMEActiveBrowserApp* pApp=(CGMEActiveBrowserApp*)AfxGetApp();
-	CMgaContext* pMgaContext=&pApp->m_CurrentProject.m_MgaContext;
-	
-	short nRedoSize,nUndoSize;
-	pMgaContext->m_ccpProject->UndoRedoSize(&nUndoSize,&nRedoSize);
-
-	if(nRedoSize>0)
-	{
-		COMTHROW(pMgaContext->m_ccpProject->Redo());
-	}
-
-
-}
-
 void CAggregateContextMenu::OnEditCut()
 {
 
@@ -1084,16 +1052,6 @@
 	short nRedoSize,nUndoSize;
 	COMTHROW(pMgaContext->m_ccpProject->UndoRedoSize(&nUndoSize,&nRedoSize));
 
-	if(nUndoSize<=0)
-	{
-		EnableMenuItem(ID_POPUP_EDIT_UNDO,MF_GRAYED);
-	}
-
-	if(nRedoSize<=0)
-	{
-		EnableMenuItem(ID_POPUP_EDIT_REDO,MF_GRAYED);
-	}
-
 	// Check all constraint
 	CComPtr<IMgaComponentEx> constrMgr = pMgaContext->FindConstraintManager();
 	if (!constrMgr)

Modified: trunk/GME/GMEActiveBrowser/AggregateContextMenu.h
==============================================================================
--- trunk/GME/GMEActiveBrowser/AggregateContextMenu.h	Wed Mar 16 15:45:48 2011	(r1210)
+++ trunk/GME/GMEActiveBrowser/AggregateContextMenu.h	Mon Mar 21 14:16:00 2011	(r1211)
@@ -64,8 +64,6 @@
 	void OnEditCopyClosure();
 	void OnEditCopySmart();
 	void OnEditCut();
-	void OnEditRedo();
-	void OnEditUndo();
 	void OnCustomItems(UINT nID);
 	BOOL DispatchCommand(UINT nSelectedID);
 private:

Modified: trunk/GME/GMEActiveBrowser/GMEActiveBrowser.rc
==============================================================================
--- trunk/GME/GMEActiveBrowser/GMEActiveBrowser.rc	Wed Mar 16 15:45:48 2011	(r1210)
+++ trunk/GME/GMEActiveBrowser/GMEActiveBrowser.rc	Mon Mar 21 14:16:00 2011	(r1211)
@@ -13,13 +13,11 @@
 #undef APSTUDIO_READONLY_SYMBOLS
 
 /////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// English (United States) resources
 
 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 #pragma code_page(1252)
-#endif //_WIN32
 
 #ifdef APSTUDIO_INVOKED
 /////////////////////////////////////////////////////////////////////////////
@@ -103,7 +101,7 @@
 // Dialog
 //
 
-IDD_PROPPAGE_GMEACTIVEBROWSER DIALOG  0, 0, 250, 62
+IDD_PROPPAGE_GMEACTIVEBROWSER DIALOG 0, 0, 250, 62
 STYLE DS_SETFONT | WS_CHILD
 FONT 8, "MS Sans Serif"
 BEGIN
@@ -192,7 +190,7 @@
 //
 
 #ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO 
+GUIDELINES DESIGNINFO
 BEGIN
     IDD_PROPPAGE_GMEACTIVEBROWSER, DIALOG
     BEGIN
@@ -265,7 +263,7 @@
 // Menu
 //
 
-CG_IDR_POPUP_AGGREGATE_PROPERTY_PAGE_MULTIPLE_ITEMS MENU 
+CG_IDR_POPUP_AGGREGATE_PROPERTY_PAGE_MULTIPLE_ITEMS MENU
 BEGIN
     POPUP "_POPUP_"
     BEGIN
@@ -273,9 +271,6 @@
         MENUITEM "&Attributes",                 ID_POPUP_ATTRIBUTES
         MENUITEM "Pr&eferences",                ID_POPUP_PREFERENCES
         MENUITEM SEPARATOR
-        MENUITEM "&Undo",                       ID_POPUP_EDIT_UNDO
-        MENUITEM "&Redo",                       ID_POPUP_EDIT_REDO
-        MENUITEM SEPARATOR
         MENUITEM "&Copy",                       ID_EDIT_COPY
         MENUITEM "C&opy Closure",               ID_EDIT_COPYCLOSURE
         MENUITEM "Copy &Smart",                 ID_EDIT_COPYSMART
@@ -292,7 +287,7 @@
     END
 END
 
-CG_IDR_POPUP_AGGREGATE_PROPERTY_PAGE_GENERAL MENU 
+CG_IDR_POPUP_AGGREGATE_PROPERTY_PAGE_GENERAL MENU
 BEGIN
     POPUP "_POPUP_"
     BEGIN
@@ -303,12 +298,6 @@
             MENUITEM "&Creation",                   ID_POPUP_SORT_CREATION
         END
         MENUITEM SEPARATOR
-        POPUP "&Edit"
-        BEGIN
-            MENUITEM "&Undo",                       ID_POPUP_EDIT_UNDO
-            MENUITEM "&Redo",                       ID_POPUP_EDIT_REDO
-        END
-        MENUITEM SEPARATOR
         POPUP "&Constraints"
         BEGIN
             MENUITEM "Check &All",                  ID_POPUP_SORT_CONSTRAINTS_CHECKALL
@@ -318,7 +307,7 @@
     END
 END
 
-CG_IDR_POPUP_AGGREGATE_PROPERTY_PAGE_SINGLE_ITEM MENU 
+CG_IDR_POPUP_AGGREGATE_PROPERTY_PAGE_SINGLE_ITEM MENU
 BEGIN
     POPUP "_POPUP_"
     BEGIN
@@ -331,9 +320,6 @@
         MENUITEM SEPARATOR
         MENUITEM "INSERTIONS",                  ID_POPUP_INSERTIONS
         MENUITEM SEPARATOR
-        MENUITEM "&Undo",                       ID_POPUP_EDIT_UNDO
-        MENUITEM "&Redo",                       ID_POPUP_EDIT_REDO
-        MENUITEM SEPARATOR
         MENUITEM "&Copy",                       ID_EDIT_COPY
         MENUITEM "C&opy Closure",               ID_EDIT_COPYCLOSURE
         MENUITEM "Copy &Smart",                 ID_EDIT_COPYSMART
@@ -393,24 +379,24 @@
 // String Table
 //
 
-STRINGTABLE 
+STRINGTABLE
 BEGIN
     IDS_GMEACTIVEBROWSER    "GMEActiveBrowser Control"
     IDS_GMEACTIVEBROWSER_PPG "GMEActiveBrowser Property Page"
 END
 
-STRINGTABLE 
+STRINGTABLE
 BEGIN
     IDS_GMEACTIVEBROWSER_PPG_CAPTION "General"
     IDS_PROPSHT_CAPTION     "PropertySheet"
 END
 
-STRINGTABLE 
+STRINGTABLE
 BEGIN
     AFX_IDS_APP_TITLE       "Model Browser"
 END
 
-#endif    // English (U.S.) resources
+#endif    // English (United States) resources
 /////////////////////////////////////////////////////////////////////////////
 
 

Modified: trunk/GME/GMEActiveBrowser/resource.h
==============================================================================
--- trunk/GME/GMEActiveBrowser/resource.h	Wed Mar 16 15:45:48 2011	(r1210)
+++ trunk/GME/GMEActiveBrowser/resource.h	Mon Mar 21 14:16:00 2011	(r1211)
@@ -51,8 +51,6 @@
 #define ID_POPUP_SORT_CREATION          32772
 #define ID_POPUP_SORT_CONSTRAINTS_CHECKALL 32773
 #define ID_POPUP_DISPLAYOPTIONS         32774
-#define ID_POPUP_EDIT_UNDO              32776
-#define ID_POPUP_EDIT_REDO              32777
 #define ID_POPUP_EDIT_DELETE            32778
 #define ID_POPUP_PROPERTIES             32779
 #define ID_POPUP_ATTRIBUTES             32780


More information about the gme-commit mailing list