[GME-commit] GMESRC/GME/GMEActiveBrowser
ActiveBrowserPropertyPage.cpp, 1.62,
1.63 ActiveBrowserPropertyPage.h, 1.19,
1.20 AggregateTreeCtrl.cpp, 1.28, 1.29 AggregateTreeCtrl.h,
1.9, 1.10
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Sat Jun 16 16:46:03 CDT 2007
Update of /project/gme-repository/GMESRC/GME/GMEActiveBrowser
In directory escher:/tmp/cvs-serv16563
Modified Files:
ActiveBrowserPropertyPage.cpp ActiveBrowserPropertyPage.h
AggregateTreeCtrl.cpp AggregateTreeCtrl.h
Log Message:
1.SourceControl status showed more precisely: if a file has newer version, reflect that on the container's icon. (Currently as a library)
2.To avoid memory-leaks, a few destructors have been enriched to deallocate explicitly.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: ActiveBrowserPropertyPage.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** ActiveBrowserPropertyPage.h 7 Mar 2007 21:29:05 -0000 1.19
--- ActiveBrowserPropertyPage.h 16 Jun 2007 21:46:01 -0000 1.20
***************
*** 44,48 ****
CComboEdit m_ComboEditCtrl;
! int GetSourceControlStateOffset(IMgaObject * obj);
BOOL HasDisplayedChild(HTREEITEM hItem);
--- 44,48 ----
CComboEdit m_ComboEditCtrl;
! int GetSourceControlStateOffset(IMgaObject * obj, int * latent);
BOOL HasDisplayedChild(HTREEITEM hItem);
Index: AggregateTreeCtrl.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/AggregateTreeCtrl.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** AggregateTreeCtrl.h 7 Mar 2007 21:29:05 -0000 1.9
--- AggregateTreeCtrl.h 16 Jun 2007 21:46:01 -0000 1.10
***************
*** 26,30 ****
! void SetItemProperties(HTREEITEM hItem);
BOOL DoDrop(eDragOperation doDragOp, COleDataObject *pDataObject, CPoint point);
BOOL DoDropWithoutChecking(eDragOperation doDragOp, COleDataObject *pDataObject, CPoint point);
--- 26,30 ----
! void SetItemProperties(HTREEITEM hItem, int p_fileLatentState = 0);
BOOL DoDrop(eDragOperation doDragOp, COleDataObject *pDataObject, CPoint point);
BOOL DoDropWithoutChecking(eDragOperation doDragOp, COleDataObject *pDataObject, CPoint point);
Index: ActiveBrowserPropertyPage.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** ActiveBrowserPropertyPage.cpp 3 May 2007 19:26:06 -0000 1.62
--- ActiveBrowserPropertyPage.cpp 16 Jun 2007 21:46:01 -0000 1.63
***************
*** 60,63 ****
--- 60,67 ----
CAggregatePropertyPage::~CAggregatePropertyPage()
{
+ m_ImageList.DeleteImageList();
+ m_StateImageList.DeleteImageList();
+ VERIFY( m_ImageList.GetSafeHandle() == NULL);
+ VERIFY( m_StateImageList.GetSafeHandle() == NULL);
}
***************
*** 261,272 ****
}
! int CAggregatePropertyPage::GetSourceControlStateOffset(IMgaObject * obj)
{
! try
{
CComQIPtr<IMgaFCO> fco(obj);
if( fco==NULL )
! return 0;
long regCount;
--- 265,277 ----
}
! int CAggregatePropertyPage::GetSourceControlStateOffset(IMgaObject * obj, int * latent)
{
! int ret_val = 0;
! try
{
CComQIPtr<IMgaFCO> fco(obj);
if( fco==NULL )
! return ret_val;
long regCount;
***************
*** 287,296 ****
COMTHROW(reg->get_Value(®nodeValue));
if( regnodeValue == "GME_SourceControl_State_local" )
! return 4*ICON_NUMBER;
else if( regnodeValue == "GME_SourceControl_State_other" )
! return 2*ICON_NUMBER;
else
! return 0;
}
}
}
--- 292,310 ----
COMTHROW(reg->get_Value(®nodeValue));
if( regnodeValue == "GME_SourceControl_State_local" )
! ret_val = 4*ICON_NUMBER;
else if( regnodeValue == "GME_SourceControl_State_other" )
! ret_val = 2*ICON_NUMBER;
else
! ret_val = 0;
}
+ if( regnodeName == "SourceControlStat")
+ {
+ CComBSTR regnodeValue;
+ COMTHROW(reg->get_Value(®nodeValue));
+ if( regnodeValue == "GME_SourceControl_File_ModByOthers" )
+ *latent = 1;
+ else if( regnodeValue == "GME_SourceControl_File_UpToDate" )
+ *latent = 0;
+ }
}
}
***************
*** 298,303 ****
{
}
!
! return 0;
}
--- 312,321 ----
{
}
! if( *latent)
! {
! ret_val = ret_val + 10-1; // library icon, possibly decorated with the red or green tick
! *latent = 0;
! }
! return ret_val;
}
***************
*** 2588,2591 ****
--- 2606,2613 ----
m_theCurrentRootFCO = NULL;
m_pPrevSelectedItem = NULL;
+ m_ImageList.DeleteImageList();
+ m_StateImageList.DeleteImageList();
+ VERIFY( m_ImageList.GetSafeHandle() == NULL);
+ VERIFY( m_StateImageList.GetSafeHandle() == NULL);
}
***************
*** 3196,3199 ****
--- 3218,3223 ----
CMetaPropertyPage::~CMetaPropertyPage()
{
+ m_ImageList.DeleteImageList();
+ VERIFY( m_ImageList.GetSafeHandle() == NULL);
}
Index: AggregateTreeCtrl.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** AggregateTreeCtrl.cpp 7 Mar 2007 21:29:05 -0000 1.28
--- AggregateTreeCtrl.cpp 16 Jun 2007 21:46:01 -0000 1.29
***************
*** 60,63 ****
--- 60,64 ----
int sourceControlImageOffset = 0;
+ int sourceControlLatentState = 0;
if(pParent->m_Options.m_bIsDynamicLoading)
***************
*** 68,72 ****
CComQIPtr<IMgaObject> ccpMgaObject(pUnknown);
tvInsert.item.cChildren=pParent->reqHasDisplayedChild(ccpMgaObject);
! sourceControlImageOffset = pParent->GetSourceControlStateOffset(ccpMgaObject);
}
else
--- 69,73 ----
CComQIPtr<IMgaObject> ccpMgaObject(pUnknown);
tvInsert.item.cChildren=pParent->reqHasDisplayedChild(ccpMgaObject);
! sourceControlImageOffset = pParent->GetSourceControlStateOffset(ccpMgaObject, &sourceControlLatentState);
}
else
***************
*** 117,121 ****
m_MgaMap.AddEntry(hItem,ObjectProxy);
! SetItemProperties(hItem);
return hItem;
--- 118,122 ----
m_MgaMap.AddEntry(hItem,ObjectProxy);
! SetItemProperties(hItem, sourceControlLatentState);
return hItem;
***************
*** 147,150 ****
--- 148,152 ----
int sourceControlImageOffset = 0;
+ int sourceControlLatentState = 0;
if(pParent->m_Options.m_bIsDynamicLoading)
***************
*** 155,159 ****
CComQIPtr<IMgaObject> ccpMgaObject(pUnknown);
tvInsert.item.cChildren=pParent->reqHasDisplayedChild(ccpMgaObject);
! sourceControlImageOffset = pParent->GetSourceControlStateOffset(ccpMgaObject);
}
else
--- 157,161 ----
CComQIPtr<IMgaObject> ccpMgaObject(pUnknown);
tvInsert.item.cChildren=pParent->reqHasDisplayedChild(ccpMgaObject);
! sourceControlImageOffset = pParent->GetSourceControlStateOffset(ccpMgaObject, &sourceControlLatentState);
}
else
***************
*** 206,210 ****
m_MgaMap.AddEntry(hItem,ObjectProxy);
! SetItemProperties(hItem);
return hItem;
--- 208,212 ----
m_MgaMap.AddEntry(hItem,ObjectProxy);
! SetItemProperties(hItem, sourceControlLatentState);
return hItem;
***************
*** 1160,1164 ****
}
! void CAggregateTreeCtrl::SetItemProperties(HTREEITEM hItem)
{
--- 1162,1166 ----
}
! void CAggregateTreeCtrl::SetItemProperties(HTREEITEM hItem, int p_fileLatentState)
{
***************
*** 1187,1191 ****
COMTHROW( ccpObject->HasReadOnlyAccess( &vtbIsReadOnly));
! if (vtbIsWritable != VARIANT_TRUE || vtbIsReadOnly == VARIANT_TRUE)
{
// Read only object
--- 1189,1193 ----
COMTHROW( ccpObject->HasReadOnlyAccess( &vtbIsReadOnly));
! if (vtbIsWritable != VARIANT_TRUE || vtbIsReadOnly == VARIANT_TRUE || p_fileLatentState != 0)
{
// Read only object
More information about the GME-commit
mailing list