[GME-commit] GMESRC/GME/GMEActiveBrowser ActiveBrowserPropertyPage.cpp,1.58,1.59 ActiveBrowserPropertyPage.h,1.17,1.18 AggregateContextMenu.cpp,1.26,1.27 AggregateContextMenu.h,1.8,1.9 AttachLibDlg.cpp,1.2,1.3 AttachLibDlg.h,1.2,1.3 GMEActiveBrowser.rc,1.16,1.17 GMEActiveBrowser.vcproj,1.1,1.2 resource.h,1.11,1.12

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Tue Jan 16 17:48:09 CST 2007


Update of /project/gme-repository/GMESRC/GME/GMEActiveBrowser
In directory escher:/tmp/cvs-serv5209

Modified Files:
	ActiveBrowserPropertyPage.cpp ActiveBrowserPropertyPage.h 
	AggregateContextMenu.cpp AggregateContextMenu.h 
	AttachLibDlg.cpp AttachLibDlg.h GMEActiveBrowser.rc 
	GMEActiveBrowser.vcproj resource.h 
Log Message:

1. Keyshortcuts introduced:

ctrl+F: find
ctrl+I: jump to inspector
ctrl+c, +v : copy & paste
tab: jump to search combo box 
ctrl+tab: cycle through aggregate, inheritance, meta pages
F2: rename

2. initally set focus to the treebrowser in the aggregate page (can use keyboard to navigate after project open)

3. Library deletion handled separately, library dependencies menu item added, context menu changed in case of libraries

4. attach dlg, refresh dlg new option: 'optimized', focus set to path initially, "MGA=" and ".mga" prefix and suffix added automatically if user leaves out in dialog.



CVS User: Zoltan Molnar, ISIS (zolmol)

Index: AggregateContextMenu.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/AggregateContextMenu.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** AggregateContextMenu.cpp	1 Nov 2006 17:43:40 -0000	1.26
--- AggregateContextMenu.cpp	16 Jan 2007 17:48:06 -0000	1.27
***************
*** 96,99 ****
--- 96,100 ----
  			case ID_POPUP_ATTACH_LIBRARY: OnAttachLibrary();break;
  			case ID_POPUP_REFRESH_LIBRARY: OnRefreshLibrary();break;
+ 			case ID_POPUP_LIBRARY_DEPENDENCIES: OnLibraryDependencies();break;
  
  			case ID_POPUP_SORT_CONSTRAINTS_CHECKALL: OnCheckAllConstraint();break;
***************
*** 391,403 ****
  		    // So we collapse the item to be deleted, to avoid the inconsistency
  		    // caused by the order of deleting the child items and the parents in MGA
! 		    m_pParent->m_TreeAggregate.DeleteAllChildren(hSelItem);
! 		    if(m_pParent->m_TreeAggregate.m_MgaMap.LookupObjectUnknown(hSelItem,pUnknown))
! 		    {
! 			    CComQIPtr<IMgaObject> ccpMgaObject(pUnknown);
! 			    // throws E_MGA_MUST_ABORT if user selects CANCEL
! 			    detach_answered = m_pParent->askUserAndDetach( ccpMgaObject);
! 			    // Deleting object
! 			    COMTHROW(ccpMgaObject->DestroyObject());
! 		    }
  		    hSelItem=m_pParent->m_TreeAggregate.GetNextSelectedItem(hSelItem);
  	    }
--- 392,413 ----
  		    // So we collapse the item to be deleted, to avoid the inconsistency
  		    // caused by the order of deleting the child items and the parents in MGA
! 			if( m_pParent->m_TreeAggregate.m_MgaMap.LookupObjectUnknown(hSelItem,pUnknown))
! 			{
! 				if( m_pParent->m_TreeAggregate.IsLibrary(pUnknown))
! 				{
! 					CComQIPtr<IMgaFolder> ccpMgaFolder(pUnknown);
! 					bool deld = m_pParent->askUserAndDeleteLibrary( ccpMgaFolder);
! 					if( deld) m_pParent->m_TreeAggregate.DeleteAllChildren(hSelItem);
! 				}
! 				else
! 				{
! 					m_pParent->m_TreeAggregate.DeleteAllChildren(hSelItem);
! 					CComQIPtr<IMgaObject> ccpMgaObject(pUnknown);
! 					// throws E_MGA_MUST_ABORT if user selects CANCEL
! 					detach_answered = m_pParent->askUserAndDetach( ccpMgaObject);
! 					// Deleting object
! 					COMTHROW(ccpMgaObject->DestroyObject());
! 				}
! 			}
  		    hSelItem=m_pParent->m_TreeAggregate.GetNextSelectedItem(hSelItem);
  	    }
***************
*** 663,672 ****
  				// EnableMenuItem(ID_POPUP_REGISTRY,MF_GRAYED);
  
! 				EnableMenuItem(ID_POPUP_ATTACH_LIBRARY, hItem == m_pParent->m_TreeAggregate.GetRootItem()?MF_ENABLED : MF_GRAYED);
  				if(!m_pParent->m_TreeAggregate.IsLibrary(MgaObjectProxy.m_pMgaObject))
  				{
! 					EnableMenuItem(ID_POPUP_REFRESH_LIBRARY,MF_GRAYED);
  				}
  
  				
  				EnableMenuItem(ID_POPUP_CONSTRAINTS_CHECK,MF_GRAYED);
--- 673,694 ----
  				// EnableMenuItem(ID_POPUP_REGISTRY,MF_GRAYED);
  
! 				if( hItem == m_pParent->m_TreeAggregate.GetRootItem())
! 					EnableMenuItem( ID_POPUP_ATTACH_LIBRARY, MF_ENABLED);
! 				else
! 					DeleteMenu( ID_POPUP_ATTACH_LIBRARY, MF_BYCOMMAND);
! 
  				if(!m_pParent->m_TreeAggregate.IsLibrary(MgaObjectProxy.m_pMgaObject))
  				{
! 					DeleteMenu( ID_POPUP_REFRESH_LIBRARY, MF_BYCOMMAND);
! 				}
! 				else
! 				{
! 					InsertMenu(ID_POPUP_REFRESH_LIBRARY, MF_BYCOMMAND|MF_STRING, ID_POPUP_LIBRARY_DEPENDENCIES, "&Library dependencies");
! 					DeleteMenu(ID_POPUP_ATTRIBUTES, MF_BYCOMMAND);
! 					DeleteMenu(ID_POPUP_PREFERENCES, MF_BYCOMMAND);
! 					EnableMenuItem(ID_POPUP_REFRESH_LIBRARY, MF_ENABLED);
  				}
  
+ 
  				
  				EnableMenuItem(ID_POPUP_CONSTRAINTS_CHECK,MF_GRAYED);
***************
*** 780,784 ****
  	if(mnuInsertFolder.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertFolder.GetSafeHmenu(),"Insert Folder");
  		mnuInsertFolder.Detach();
  	}
--- 802,806 ----
  	if(mnuInsertFolder.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertFolder.GetSafeHmenu(),"Insert &Folder");
  		mnuInsertFolder.Detach();
  	}
***************
*** 855,859 ****
  	if(mnuInsertAtom.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertAtom.GetSafeHmenu(),"Insert Atom");
  		mnuInsertAtom.Detach();
  	}
--- 877,881 ----
  	if(mnuInsertAtom.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertAtom.GetSafeHmenu(),"Insert &Atom");
  		mnuInsertAtom.Detach();
  	}
***************
*** 862,866 ****
  	if(mnuInsertModel.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertModel.GetSafeHmenu(),"Insert Model");
  		mnuInsertModel.Detach();
  	}
--- 884,888 ----
  	if(mnuInsertModel.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertModel.GetSafeHmenu(),"Insert &Model");
  		mnuInsertModel.Detach();
  	}
***************
*** 869,873 ****
  	if(mnuInsertReference.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertReference.GetSafeHmenu(),"Insert Reference");
  		mnuInsertReference.Detach();
  	}
--- 891,895 ----
  	if(mnuInsertReference.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertReference.GetSafeHmenu(),"Insert &Reference");
  		mnuInsertReference.Detach();
  	}
***************
*** 876,880 ****
  	if(mnuInsertSet.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertSet.GetSafeHmenu(),"Insert Set");
  		mnuInsertSet.Detach();
  	}
--- 898,902 ----
  	if(mnuInsertSet.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertSet.GetSafeHmenu(),"Insert &Set");
  		mnuInsertSet.Detach();
  	}
***************
*** 988,992 ****
  	if(mnuInsertAtom.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertAtom.GetSafeHmenu(),"Insert Atom");
  		mnuInsertAtom.Detach();
  	}
--- 1010,1014 ----
  	if(mnuInsertAtom.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertAtom.GetSafeHmenu(),"Insert &Atom");
  		mnuInsertAtom.Detach();
  	}
***************
*** 995,999 ****
  	if(mnuInsertModel.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertModel.GetSafeHmenu(),"Insert Model");
  		mnuInsertModel.Detach();
  	}
--- 1017,1021 ----
  	if(mnuInsertModel.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertModel.GetSafeHmenu(),"Insert &Model");
  		mnuInsertModel.Detach();
  	}
***************
*** 1002,1006 ****
  	if(mnuInsertReference.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertReference.GetSafeHmenu(),"Insert Reference");
  		mnuInsertReference.Detach();
  	}
--- 1024,1028 ----
  	if(mnuInsertReference.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertReference.GetSafeHmenu(),"Insert &Reference");
  		mnuInsertReference.Detach();
  	}
***************
*** 1009,1013 ****
  	if(mnuInsertSet.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertSet.GetSafeHmenu(),"Insert Set");
  		mnuInsertSet.Detach();
  	}
--- 1031,1035 ----
  	if(mnuInsertSet.GetMenuItemCount()!=NULL) 
  	{
! 		InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertSet.GetSafeHmenu(),"Insert &Set");
  		mnuInsertSet.Detach();
  	}
***************
*** 1104,1107 ****
--- 1126,1134 ----
  
  	m_pParent->RefreshLibrary();
+ }
+ 
+ void CAggregateContextMenu::OnLibraryDependencies()
+ {
+ 	m_pParent->LibraryDependencies();
  }
  

Index: ActiveBrowserPropertyPage.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** ActiveBrowserPropertyPage.cpp	8 Dec 2006 19:38:06 -0000	1.58
--- ActiveBrowserPropertyPage.cpp	16 Jan 2007 17:48:06 -0000	1.59
***************
*** 1515,1521 ****
  	dlg.m_strCaption="Attach Library";
  	
! 	if(dlg.DoModal() == IDOK) 
  	{
! 		
  		MSGTRY {
  			HTREEITEM hItem = m_TreeAggregate.GetFirstSelectedItem();
--- 1515,1536 ----
  	dlg.m_strCaption="Attach Library";
  	
! 	if(dlg.DoModal() == IDOK && !dlg.m_strConnString.IsEmpty()) 
  	{
! 		if( dlg.m_strConnString.Left(4) != "MGA=") dlg.m_strConnString.Insert(0, "MGA=");
! 		if( dlg.m_strConnString.Find( ".") == -1) dlg.m_strConnString += ".mga";
! 
! 		if( dlg.m_bOptimized)
! 		{
! 			int pos = dlg.m_strConnString.Find( " (optimized)");
! 			if( pos == -1) // add if not found
! 				dlg.m_strConnString += " (optimized)";
! 		}
! 		else
! 		{
! 			int pos = dlg.m_strConnString.Find( " (optimized)");
! 			if( pos != -1) // remove if option indicates 'not optimized' and string still found (on attach should not happen)
! 				dlg.m_strConnString = dlg.m_strConnString.Left( pos);
! 		}
! 
  		MSGTRY {
  			HTREEITEM hItem = m_TreeAggregate.GetFirstSelectedItem();
***************
*** 1597,1600 ****
--- 1612,1628 ----
  			if(dlg.DoModal() == IDOK) 
  			{
+ 				if( dlg.m_bOptimized)
+ 				{
+ 					int pos = dlg.m_strConnString.Find( " (optimized)");
+ 					if( pos == -1) // add if not found
+ 						dlg.m_strConnString += " (optimized)";
+ 				}
+ 				else
+ 				{
+ 					int pos = dlg.m_strConnString.Find( " (optimized)");
+ 					if( pos != -1) // remove if option indicates 'not optimized' and string is still found
+ 						dlg.m_strConnString = dlg.m_strConnString.Left( pos);
+ 				}
+ 
  				pMgaContext->BeginTransaction(FALSE);
  					
***************
*** 1606,1609 ****
--- 1634,1816 ----
  		Refresh();
  	}
+ }
+ 
+ void CAggregatePropertyPage::LibraryDependencies()
+ {
+ 	CGMEActiveBrowserApp* pApp=(CGMEActiveBrowserApp*)AfxGetApp();
+ 	CMgaContext* pMgaContext=&pApp->m_CurrentProject.m_MgaContext;
+ 
+ 	HTREEITEM hItem = m_TreeAggregate.GetFirstSelectedItem();
+ 	if (hItem != NULL) 
+ 	{ 
+ 		
+ 		LPUNKNOWN pUnknown;
+ 		
+ 		if(!m_TreeAggregate.m_MgaMap.LookupObjectUnknown(hItem,pUnknown))return;
+ 					
+ 		CComQIPtr<IMgaFolder> ccpFolder(pUnknown);
+ 		if(!ccpFolder)return;
+ 
+ 		MSGTRY {
+ 			
+ 			CGMEActiveBrowserApp* pApp=(CGMEActiveBrowserApp*)AfxGetApp();
+ 			CMgaContext* pMgaContext=&pApp->m_CurrentProject.m_MgaContext;
+ 
+ 			pMgaContext->BeginTransaction(FALSE);
+ 
+ 			CComBSTR bszLibName;						
+ 			COMTHROW(ccpFolder->get_LibraryName(&bszLibName));
+ 			//pMgaContext->CommitTransaction();
+ 			pMgaContext->AbortTransaction();
+ 		
+ 			if(!bszLibName)
+ 			{
+ 		
+ 				AfxMessageBox("Selected node is not a library");
+ 				return;
+ 			}
+ 			CString m1, m2;
+ 			{
+ 			CString val, nfnd; CComBSTR incby_value;
+ 			CComBSTR incby_path( L"_includedBy");
+ 
+ 			pMgaContext->BeginTransaction(FALSE);
+ 			ccpFolder->get_RegistryValue( incby_path, &incby_value);
+ 
+ 			CopyTo( incby_value, val);
+ 			int i = 0;
+ 			CString lst;
+ 			CString token;
+ 			token = val.Tokenize( "\n", i);
+ 			while( token != "")
+ 			{
+ 				bool error = true;
+ 				CComPtr<IMgaObject> obj;
+ 				if( SUCCEEDED( pMgaContext->m_ccpProject->GetObjectByID( CComBSTR( token), &obj)))
+ 				{
+ 					CComQIPtr<IMgaFolder> fld( obj);
+ 					long stat;
+ 					obj->get_Status( &stat);
+ 					if( fld && stat == OBJECT_EXISTS)
+ 					{
+ 						CComBSTR connstr;
+ 						fld->get_LibraryName( &connstr);
+ 						if( connstr && connstr.Length() > 0) 
+ 						{
+ 							CString cs; 
+ 							CopyTo( connstr, cs);
+ 							lst += cs + " [ " + token + " ]\n";
+ 							error = false;
+ 						}
+ 					}
+ 				}
+ 
+ 				if( error)
+ 				{
+ 					nfnd += "Not found [ " + token + " ]\n";
+ 				}
+ 
+ 				token = val.Tokenize( "\n", i);
+ 			}
+ 
+ 			m1 = CString( "Libraries depending on this:\n") + (lst.IsEmpty()?"None":lst);
+ 
+ 			if( !nfnd.IsEmpty())
+ 			{
+ 				m1 += CString("\nErrors:\n") + nfnd;
+ 			}
+ 			}
+ 
+ 			{
+ 			CString val; CComBSTR incls_value;
+ 			CComBSTR incls_path( L"_includes");
+ 
+ 			ccpFolder->get_RegistryValue( incls_path, &incls_value);
+ 
+ 			CopyTo( incls_value, val);
+ 			int i = 0;
+ 			CString lst;
+ 			CString token;
+ 			token = val.Tokenize( "\n", i);
+ 			while( token != "")
+ 			{
+ 				CComPtr<IMgaObject> obj;
+ 				if( SUCCEEDED( pMgaContext->m_ccpProject->GetObjectByID( CComBSTR( token), &obj)))
+ 				{
+ 					CComQIPtr<IMgaFolder> fld( obj);
+ 					if( fld)
+ 					{
+ 						{
+ 							CComBSTR connstr;
+ 							fld->get_LibraryName( &connstr);
+ 							if( connstr && connstr.Length() > 0) 
+ 							{
+ 								CString cs; 
+ 								CopyTo( connstr, cs);
+ 								lst += cs + " [ " + token + " ]\n";
+ 							}
+ 						}
+ 						//else
+ 						{
+ 							// remove from the reg list
+ 						}
+ 					}
+ 				}
+ 				token = val.Tokenize( "\n", i);
+ 			}
+ 
+ 			//pMgaContext->CommitTransaction();
+ 			pMgaContext->AbortTransaction();
+ 
+ 			m2 = CString( "Libraries included are the following:\n") + (lst.IsEmpty()?"None":lst);
+ 
+ 			}
+ 
+ 			AfxMessageBox( m1 + "\n\n" + m2);
+ 
+ 		} MSGCATCH("Error while viewing library dependencies",pMgaContext->AbortTransaction();)	
+ 		//Refresh();
+ 	}
+ }
+ 
+ bool CAggregatePropertyPage::askUserAndDeleteLibrary( CComPtr<IMgaFolder> p_ccpFolder)
+ {
+ 	if( !p_ccpFolder) return false;
+ 	CComBSTR bszLibName;
+ 	COMTHROW( p_ccpFolder->get_LibraryName(&bszLibName));
+ 
+ 	if( !bszLibName)
+ 	{
+ 		ASSERT( 0);
+ 		AfxMessageBox( "Selected node is not a library");
+ 		return false;
+ 	}
+ 
+ 	CString ln;
+ 	CopyTo( bszLibName, ln);
+ 
+ 	CString deps; CComBSTR depb;
+ 	CComBSTR path( L"_includedBy");
+ 
+ 	COMTHROW( p_ccpFolder->get_RegistryValue( path, &depb));
+ 
+ 	CopyTo( depb, deps);
+ 	if( deps.IsEmpty())
+ 	{
+ 		deps = "No dependent libraries found.";
+ 	}
+ 	else
+ 	{
+ 		deps = "Dependent libraries found:\n" + deps;
+ 	}
+ 	deps += "\n\nDelete " + ln + "?";
+ 	if( IDYES == AfxMessageBox( deps, MB_YESNO))
+ 	{
+ 		//p_ccpFolder->PutReadOnlyAccess( VARIANT_FALSE);
+ 		p_ccpFolder->DestroyObject();
+ 		return true;
+ 	}
+ 
+ 	return false;
  }
  

Index: GMEActiveBrowser.vcproj
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/GMEActiveBrowser.vcproj,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** GMEActiveBrowser.vcproj	26 Jan 2005 17:28:25 -0000	1.1
--- GMEActiveBrowser.vcproj	16 Jan 2007 17:48:06 -0000	1.2
***************
*** 1055,1058 ****
--- 1055,1061 ----
  	</Files>
  	<Globals>
+ 		<Global
+ 			Name="RESOURCE_FILE"
+ 			Value="GMEActiveBrowser.rc"/>
  	</Globals>
  </VisualStudioProject>

Index: AggregateContextMenu.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/AggregateContextMenu.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** AggregateContextMenu.h	13 Mar 2006 19:24:24 -0000	1.8
--- AggregateContextMenu.h	16 Jan 2007 17:48:06 -0000	1.9
***************
*** 24,27 ****
--- 24,29 ----
  	void OnRefreshLibrary();
  	void OnAttachLibrary();
+ 	void OnLibraryDependencies();
+ 
  	UINT m_nSelectionCount;
  	BOOL Run(CPoint);

Index: ActiveBrowserPropertyPage.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** ActiveBrowserPropertyPage.h	6 Dec 2006 22:00:59 -0000	1.17
--- ActiveBrowserPropertyPage.h	16 Jan 2007 17:48:06 -0000	1.18
***************
*** 29,32 ****
--- 29,35 ----
  	void RefreshLibrary();
  	void AttachLibrary();
+ 	void LibraryDependencies();
+ 	bool askUserAndDeleteLibrary( CComPtr<IMgaFolder> p_ccpFolder);
+ 
  	void PrepareStateImageList();
  	void DoDrag(CPoint ptDrag);

Index: AttachLibDlg.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/AttachLibDlg.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AttachLibDlg.h	21 Mar 2002 00:59:00 -0000	1.2
--- AttachLibDlg.h	16 Jan 2007 17:48:06 -0000	1.3
***************
*** 22,25 ****
--- 22,26 ----
  	enum { IDD = IDD_ATTACH_LIB_DIALOG };
  	CString	m_strConnString;
+ 	BOOL    m_bOptimized;
  	//}}AFX_DATA
  

Index: resource.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/resource.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** resource.h	13 Mar 2006 19:24:24 -0000	1.11
--- resource.h	16 Jan 2007 17:48:06 -0000	1.12
***************
*** 34,37 ****
--- 34,38 ----
  #define IDB_IMAGELIST_AGGREGATE_STATE   212
  #define IDD_ATTACH_LIB_DIALOG           213
+ #define IDC_CHECKOPTIMIZED              214
  #define IDC_CONNECTION_PROP             215
  #define IDC_CONN_STRING                 216
***************
*** 76,79 ****
--- 77,81 ----
  #define ID_EDIT_PASTESPECIAL_SMART_ADDITIVE 32802
  #define ID_POPUP_SHOWINPARENT           32803
+ #define ID_POPUP_LIBRARY_DEPENDENCIES   32804
  #define ID_POPUP_READONLY               32805
  #define ID_POPUP_READWRITE              32807
***************
*** 85,89 ****
  #define _APS_NEXT_RESOURCE_VALUE        220
  #define _APS_NEXT_COMMAND_VALUE         32808
! #define _APS_NEXT_CONTROL_VALUE         218
  #define _APS_NEXT_SYMED_VALUE           104
  #endif
--- 87,91 ----
  #define _APS_NEXT_RESOURCE_VALUE        220
  #define _APS_NEXT_COMMAND_VALUE         32808
! #define _APS_NEXT_CONTROL_VALUE         219
  #define _APS_NEXT_SYMED_VALUE           104
  #endif

Index: AttachLibDlg.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/AttachLibDlg.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AttachLibDlg.cpp	21 Mar 2002 00:59:00 -0000	1.2
--- AttachLibDlg.cpp	16 Jan 2007 17:48:06 -0000	1.3
***************
*** 5,8 ****
--- 5,9 ----
  #include "gmeactivebrowser.h"
  #include "AttachLibDlg.h"
+ #include "resource.h"
  
  #ifdef _DEBUG
***************
*** 21,24 ****
--- 22,26 ----
  	//{{AFX_DATA_INIT(CAttachLibDlg)
  	m_strConnString = _T("");
+ 	m_bOptimized = FALSE;
  	//}}AFX_DATA_INIT
  }
***************
*** 30,33 ****
--- 32,36 ----
  	//{{AFX_DATA_MAP(CAttachLibDlg)
  	DDX_Text(pDX, IDC_CONN_STRING, m_strConnString);
+ 	DDX_Check(pDX, IDC_CHECKOPTIMIZED, m_bOptimized);
  	//}}AFX_DATA_MAP
  }
***************
*** 65,68 ****
--- 68,78 ----
  BOOL CAttachLibDlg::OnInitDialog() 
  {
+ 	int pos = m_strConnString.Find( " (optimized)");
+ 	if( pos != -1) // remove if found
+ 	{
+ 		m_bOptimized = TRUE;
+ 		m_strConnString = m_strConnString.Left( pos);
+ 	}
+ 
  	CDialog::OnInitDialog();
  	

Index: GMEActiveBrowser.rc
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/GMEActiveBrowser.rc,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** GMEActiveBrowser.rc	6 Dec 2006 22:06:43 -0000	1.16
--- GMEActiveBrowser.rc	16 Jan 2007 17:48:06 -0000	1.17
***************
*** 189,203 ****
  END
  
! IDD_ATTACH_LIB_DIALOG DIALOG  0, 0, 280, 74
  STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  CAPTION "Attach Library"
! FONT 8, "MS Sans Serif"
  BEGIN
      DEFPUSHBUTTON   "OK",IDOK,76,53,50,14
      PUSHBUTTON      "Cancel",IDCANCEL,153,53,50,14
!     EDITTEXT        IDC_CONN_STRING,37,30,198,14,ES_AUTOHSCROLL
      LTEXT           "Mga Connection String:",IDC_STATIC,37,14,75,8
!     PUSHBUTTON      "...",IDC_BROWSE,245,30,14,14
!     ICON            IDI_LIBRARY,IDC_STATIC,8,12,21,20
  END
  
--- 189,205 ----
  END
  
! IDD_ATTACH_LIB_DIALOG DIALOGEX 0, 0, 280, 74
  STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  CAPTION "Attach Library"
! FONT 8, "MS Sans Serif", 0, 0, 0x0
  BEGIN
+     EDITTEXT        IDC_CONN_STRING,37,30,198,14,ES_AUTOHSCROLL
+     PUSHBUTTON      "...",IDC_BROWSE,245,30,14,14
      DEFPUSHBUTTON   "OK",IDOK,76,53,50,14
      PUSHBUTTON      "Cancel",IDCANCEL,153,53,50,14
!     CONTROL         "Optimized",IDC_CHECKOPTIMIZED,"Button",BS_AUTOCHECKBOX | 
!                     WS_TABSTOP,191,15,47,10
      LTEXT           "Mga Connection String:",IDC_STATIC,37,14,75,8
!     ICON            IDI_LIBRARY,IDC_STATIC,8,12,20,20
  END
  
***************
*** 345,350 ****
          MENUITEM "&Preferences",                ID_POPUP_PREFERENCES
          MENUITEM "&Registry...",                ID_POPUP_REGISTRY
!         MENUITEM "Attach Library...",           ID_POPUP_ATTACH_LIBRARY
!         MENUITEM "Refresh Library",             ID_POPUP_REFRESH_LIBRARY
          MENUITEM SEPARATOR
          MENUITEM "INSERTIONS",                  ID_POPUP_INSERTIONS
--- 347,352 ----
          MENUITEM "&Preferences",                ID_POPUP_PREFERENCES
          MENUITEM "&Registry...",                ID_POPUP_REGISTRY
!         MENUITEM "&Attach Library...",          ID_POPUP_ATTACH_LIBRARY
!         MENUITEM "&Refresh Library",            ID_POPUP_REFRESH_LIBRARY
          MENUITEM SEPARATOR
          MENUITEM "INSERTIONS",                  ID_POPUP_INSERTIONS
***************
*** 385,394 ****
          END
          MENUITEM "&Interpret",                  ID_POPUP_INTERPRET
!         POPUP "Access"
          BEGIN
              MENUITEM "Read Only",                   ID_POPUP_READONLY
              MENUITEM "Read Write",                  ID_POPUP_READWRITE
          END
!         MENUITEM "View in Parent",              ID_POPUP_SHOWINPARENT
          MENUITEM SEPARATOR
          MENUITEM "&Help",                       ID_POPUP_HELP
--- 387,396 ----
          END
          MENUITEM "&Interpret",                  ID_POPUP_INTERPRET
!         POPUP "&Access"
          BEGIN
              MENUITEM "Read Only",                   ID_POPUP_READONLY
              MENUITEM "Read Write",                  ID_POPUP_READWRITE
          END
!         MENUITEM "&View in Parent",             ID_POPUP_SHOWINPARENT
          MENUITEM SEPARATOR
          MENUITEM "&Help",                       ID_POPUP_HELP



More information about the GME-commit mailing list