[commit] r1214 - trunk/GME/GMEActiveBrowser
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Wed Mar 23 10:19:33 CDT 2011
Author: ksmyth
Date: Wed Mar 23 10:19:32 2011
New Revision: 1214
Log:
Dont delete the Follow Reference menu item GME-161. Dont show multi-user submenu for non-multi user projects
Modified:
trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp
Modified: trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp Tue Mar 22 12:57:53 2011 (r1213)
+++ trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp Wed Mar 23 10:19:32 2011 (r1214)
@@ -641,6 +641,18 @@
if(m_pParent->m_TreeAggregate.m_MgaMap.LookupObjectProxy(hItem,MgaObjectProxy))
{
+ { // Remove Multi-user submenu if not an mgx
+ CGMEActiveBrowserApp* pApp=(CGMEActiveBrowserApp*)AfxGetApp();
+ CMgaContext* pMgaContext=&pApp->m_CurrentProject.m_MgaContext;
+ CComBSTR connStr;
+ if (SUCCEEDED(pMgaContext->m_ccpProject->get_ProjectConnStr(&connStr))) {
+ if (wmemcmp(L"MGX=", connStr.m_str, 4) != 0) {
+ GetSubMenu(0)->DeleteMenu(21, MF_BYPOSITION);
+ }
+ }
+ }
+
+ int insertionsSeparatorPosition = 6;
switch(MgaObjectProxy.m_TypeInfo)
{
case OBJTYPE_FOLDER:
@@ -684,8 +696,8 @@
CMenu* pPopup=GetSubMenu(0);
if(m_InsertionMinID==m_InsertionMaxID) // There were no insertions
{ // deleting INSERTIONS
- pPopup->DeleteMenu(ID_POPUP_INSERTIONS,MF_BYCOMMAND);
- pPopup->DeleteMenu(7,MF_BYPOSITION); // deleting separator
+ pPopup->DeleteMenu(ID_POPUP_INSERTIONS,MF_BYCOMMAND);
+ pPopup->DeleteMenu(insertionsSeparatorPosition, MF_BYPOSITION); // deleting separator
}
else
{
@@ -708,7 +720,7 @@
if(m_InsertionMinID==m_InsertionMaxID)
{
pPopup->DeleteMenu(ID_POPUP_INSERTIONS,MF_BYCOMMAND); // deleting INSERTIONS
- pPopup->DeleteMenu(7,MF_BYPOSITION); // deleting separator
+ pPopup->DeleteMenu(insertionsSeparatorPosition, MF_BYPOSITION); // deleting separator
}
else
{
@@ -718,26 +730,23 @@
DeleteMenu( ID_POPUP_REFRESH_LIBRARY, MF_BYCOMMAND);
DeleteMenu( ID_POPUP_ATTACH_LIBRARY, MF_BYCOMMAND);
- //EnableMenuItem(ID_POPUP_REFRESH_LIBRARY,MF_GRAYED);
- //EnableMenuItem(ID_POPUP_ATTACH_LIBRARY,MF_GRAYED);
}break;
case OBJTYPE_REFERENCE:
{
InsertMenu( ID_POPUP_REFRESH_LIBRARY, MF_BYCOMMAND, ID_POPUP_FOLLOWREF, "&Follow Reference");
+ insertionsSeparatorPosition++;
}// no break here!
default:
{
// Delete "INSERTIONS" item plus one separator
CMenu* pPopup=GetSubMenu(0);
pPopup->DeleteMenu(ID_POPUP_INSERTIONS,MF_BYCOMMAND);
- pPopup->DeleteMenu(7,MF_BYPOSITION);
+ pPopup->DeleteMenu(insertionsSeparatorPosition, MF_BYPOSITION);
DeleteMenu( ID_POPUP_REFRESH_LIBRARY, MF_BYCOMMAND);
DeleteMenu( ID_POPUP_ATTACH_LIBRARY, MF_BYCOMMAND);
- //EnableMenuItem(ID_POPUP_REFRESH_LIBRARY,MF_GRAYED);
- //EnableMenuItem(ID_POPUP_ATTACH_LIBRARY,MF_GRAYED);
}
}
More information about the gme-commit
mailing list