[GME-commit] GMESRC/GME/GMEActiveBrowser ActiveBrowserPropertyPage.cpp,1.43,1.44 AggregateContextMenu.cpp,1.21,1.22 AggregateContextMenu.h,1.5,1.6 AggregateTreeCtrl.cpp,1.24,1.25 GMEActiveBrowser.h,1.1,1.2 GMEActiveBrowser.rc,1.12,1.13 resource.h,1.8,1.9

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Tue Jul 19 18:42:13 CDT 2005


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

Modified Files:
	ActiveBrowserPropertyPage.cpp AggregateContextMenu.cpp 
	AggregateContextMenu.h AggregateTreeCtrl.cpp 
	GMEActiveBrowser.h GMEActiveBrowser.rc resource.h 
Log Message:
For new smart copy.


CVS User: Zoltan Molnar, ISIS (zolmol)

Index: AggregateContextMenu.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/AggregateContextMenu.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** AggregateContextMenu.cpp	26 Jan 2005 17:28:25 -0000	1.21
--- AggregateContextMenu.cpp	19 Jul 2005 17:42:11 -0000	1.22
***************
*** 90,93 ****
--- 90,95 ----
  			case ID_EDIT_PASTESPECIAL_ASINSTANCE:			OnEditPasteSpecialAsInstance();break;
  			case ID_EDIT_PASTECLOSURE:	OnEditPasteClosure();break;
+ 			case ID_EDIT_PASTESPECIAL_SMART_ADDITIVE: OnEditPasteClosure();break;
+ 			case ID_EDIT_PASTESPECIAL_SMART_MERGE: OnEditPasteClosure(true);break;
  			case ID_POPUP_EDIT_DELETE:	OnEditDelete();break;
  
***************
*** 350,354 ****
  }
  
! void CAggregateContextMenu::OnEditPasteClosure()
  {
  	COleDataObject OleDataObject;
--- 352,356 ----
  }
  
! void CAggregateContextMenu::OnEditPasteClosure( bool merge)
  {
  	COleDataObject OleDataObject;
***************
*** 360,364 ****
  	else
  	{
! 		if(!m_pParent->m_TreeAggregate.DoDropWithoutChecking(DRAGOP_COPY,&OleDataObject,CPoint(0,0)))
    		{
    			m_pParent->MessageBox("Cannot paste data from the clipboard. Please select valid target item.","Paste Error",MB_ICONERROR);
--- 362,366 ----
  	else
  	{
! 		if(!m_pParent->m_TreeAggregate.DoDropWithoutChecking( merge?DRAGOP_CLOSURE_MERGE:DRAGOP_CLOSURE, &OleDataObject,CPoint(0,0)))
    		{
    			m_pParent->MessageBox("Cannot paste data from the clipboard. Please select valid target item.","Paste Error",MB_ICONERROR);

Index: AggregateContextMenu.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/AggregateContextMenu.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AggregateContextMenu.h	5 Jan 2005 19:58:12 -0000	1.5
--- AggregateContextMenu.h	19 Jul 2005 17:42:11 -0000	1.6
***************
*** 51,55 ****
  	void OnEditPasteSpecialAsSubtype();
  	void OnEditPasteSpecialAsInstance();
! 	void OnEditPasteClosure();
  	void OnEditCopy();
  	void OnEditCopyClosure();
--- 51,55 ----
  	void OnEditPasteSpecialAsSubtype();
  	void OnEditPasteSpecialAsInstance();
! 	void OnEditPasteClosure( bool merge = false);
  	void OnEditCopy();
  	void OnEditCopyClosure();

Index: ActiveBrowserPropertyPage.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** ActiveBrowserPropertyPage.cpp	13 Apr 2005 00:28:00 -0000	1.43
--- ActiveBrowserPropertyPage.cpp	19 Jul 2005 17:42:11 -0000	1.44
***************
*** 1063,1066 ****
--- 1063,1067 ----
  void CAggregatePropertyPage::DoCopySmart( int k /*= 0*/)
  {
+ 	bool is_any_folder_selected = false;
  	bool all_containers = true;
  	bool all_refs = true;
***************
*** 1141,1144 ****
--- 1142,1146 ----
  						// Append to the selected FCO list
  						ccpSelectedFolders->Append( ccpMgaFolder);
+ 						is_any_folder_selected = true;
  					}
  				}
***************
*** 1156,1166 ****
  		CComBstrObj path; 
  
  		// if container selected then it must be lonely (no multiple selection)
  		// if container selected no other kinds allowed
! 		if( any_container && !all_containers || rectSelectedList.GetCount() > 1 && all_containers)
! 		{
! 			MessageBox("Invalid selection for smart copy. You can select either one container or several non-containers.","Copy Error", MB_ICONERROR);
! 			return;
! 		}
  
  		if( any_container) k |= 1024;
--- 1158,1169 ----
  		CComBstrObj path; 
  
+ 		// commented out when new smart copy introduced
  		// if container selected then it must be lonely (no multiple selection)
  		// if container selected no other kinds allowed
! 		//if( any_container && !all_containers || rectSelectedList.GetCount() > 1 && all_containers)
! 		//{
! 		//	MessageBox("Invalid selection for smart copy. You can select either one container or several non-containers.","Copy Error", MB_ICONERROR);
! 		//	return;
! 		//}
  
  		if( any_container) k |= 1024;
***************
*** 1169,1172 ****
--- 1172,1176 ----
  		if( any_set) k |= 4096;
  		if( any_conn) k |= 8192;
+ 		if( is_any_folder_selected)  k |= 16384;
  
  		COMTHROW( cl.CoCreateInstance(L"Mga.MgaClosure") );

Index: resource.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/resource.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** resource.h	26 Jan 2005 17:28:26 -0000	1.8
--- resource.h	19 Jul 2005 17:42:11 -0000	1.9
***************
*** 73,76 ****
--- 73,78 ----
  #define ID_EDIT_PASTESPECIAL_ASINSTANCE 32799
  #define ID_EDIT_PASTECLOSURE            32800
+ #define ID_EDIT_PASTESPECIAL_SMART_MERGE 32801
+ #define ID_EDIT_PASTESPECIAL_SMART_ADDITIVE 32802
  
  // Next default values for new objects
***************
*** 79,83 ****
  #ifndef APSTUDIO_READONLY_SYMBOLS
  #define _APS_NEXT_RESOURCE_VALUE        220
! #define _APS_NEXT_COMMAND_VALUE         32801
  #define _APS_NEXT_CONTROL_VALUE         218
  #define _APS_NEXT_SYMED_VALUE           104
--- 81,85 ----
  #ifndef APSTUDIO_READONLY_SYMBOLS
  #define _APS_NEXT_RESOURCE_VALUE        220
! #define _APS_NEXT_COMMAND_VALUE         32804
  #define _APS_NEXT_CONTROL_VALUE         218
  #define _APS_NEXT_SYMED_VALUE           104

Index: GMEActiveBrowser.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/GMEActiveBrowser.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** GMEActiveBrowser.h	1 Mar 2002 21:53:00 -0000	1.1
--- GMEActiveBrowser.h	19 Jul 2005 17:42:11 -0000	1.2
***************
*** 16,20 ****
  #include "GMEActiveBrowser_i.h"
  
! enum eDragOperation{DRAGOP_COPY,DRAGOP_MOVE,DRAGOP_REFERENCE,DRAGOP_INSTANCE,DRAGOP_SUBTYPE};
  /////////////////////////////////////////////////////////////////////////////
  // CGMEActiveBrowserApp : See GMEActiveBrowser.cpp for implementation.
--- 16,20 ----
  #include "GMEActiveBrowser_i.h"
  
! enum eDragOperation{DRAGOP_COPY,DRAGOP_MOVE,DRAGOP_REFERENCE,DRAGOP_INSTANCE,DRAGOP_SUBTYPE, DRAGOP_CLOSURE, DRAGOP_CLOSURE_MERGE};
  /////////////////////////////////////////////////////////////////////////////
  // CGMEActiveBrowserApp : See GMEActiveBrowser.cpp for implementation.

Index: AggregateTreeCtrl.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** AggregateTreeCtrl.cpp	12 May 2005 00:52:45 -0000	1.24
--- AggregateTreeCtrl.cpp	19 Jul 2005 17:42:11 -0000	1.25
***************
*** 750,753 ****
--- 750,757 ----
  	if( doDragOp == DRAGOP_MOVE)
  		_t = " MOVE\r\n";
+ 	if( doDragOp == DRAGOP_CLOSURE)
+ 		_t = " CLOSURE COPY\r\n";
+ 	if( doDragOp == DRAGOP_CLOSURE_MERGE)
+ 		_t = " COPY MERGE\r\n";
  	MGATREECTRL_LOGEVENT( _t);
  
***************
*** 780,789 ****
  			return FALSE;
  		}
! 		if (doDragOp != DRAGOP_COPY) {
  			MessageBox("Only copy operation is supported on GME XML clipboard format.","Error",MB_OK|MB_ICONERROR);
  			return FALSE;
  		}
  			
! 		bool res = CGMEDataSource::ParseXMLData(pDataObject, ccpTargetObject);
  		
  		return res?TRUE:FALSE;
--- 784,793 ----
  			return FALSE;
  		}
! 		if (doDragOp != DRAGOP_COPY && doDragOp != DRAGOP_CLOSURE && doDragOp != DRAGOP_CLOSURE_MERGE) {
  			MessageBox("Only copy operation is supported on GME XML clipboard format.","Error",MB_OK|MB_ICONERROR);
  			return FALSE;
  		}
  			
! 		bool res = CGMEDataSource::ParseXMLData(pDataObject, ccpTargetObject, doDragOp == DRAGOP_CLOSURE_MERGE);
  		
  		return res?TRUE:FALSE;

Index: GMEActiveBrowser.rc
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/GMEActiveBrowser.rc,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** GMEActiveBrowser.rc	26 Jan 2005 17:28:25 -0000	1.12
--- GMEActiveBrowser.rc	19 Jul 2005 17:42:11 -0000	1.13
***************
*** 365,369 ****
              MENUITEM "As Instance",                 ID_EDIT_PASTESPECIAL_ASINSTANCE
  
!             MENUITEM "Closure/Smart",               ID_EDIT_PASTECLOSURE
          END
          MENUITEM SEPARATOR
--- 365,376 ----
              MENUITEM "As Instance",                 ID_EDIT_PASTESPECIAL_ASINSTANCE
  
!             MENUITEM "Closure",                     ID_EDIT_PASTECLOSURE
!             POPUP "Smart"
!             BEGIN
!                 MENUITEM "Add",                         ID_EDIT_PASTESPECIAL_SMART_ADDITIVE
! 
!                 MENUITEM "Merge",                       ID_EDIT_PASTESPECIAL_SMART_MERGE
! 
!             END
          END
          MENUITEM SEPARATOR



More information about the GME-commit mailing list