Index: src/ch/MiniViewDlg.cpp =================================================================== diff -u -r011ceadef0413975974fa61983d903bf1a900ab6 -rc5252ea6f56ae2094a1f46fce4900f4e7be61a17 --- src/ch/MiniViewDlg.cpp (.../MiniViewDlg.cpp) (revision 011ceadef0413975974fa61983d903bf1a900ab6) +++ src/ch/MiniViewDlg.cpp (.../MiniViewDlg.cpp) (revision c5252ea6f56ae2094a1f46fce4900f4e7be61a17) @@ -44,21 +44,19 @@ ///////////////////////////////////////////////////////////////////////////// // CMiniViewDlg dialog -CMiniViewDlg::CMiniViewDlg(chcore::TTaskManager* pArray, bool *pbHide, CWnd* pParent /*=NULL*/) +CMiniViewDlg::CMiniViewDlg(chcore::TTaskManager* pTaskManager, bool *pbHide, CWnd* pParent /*=NULL*/) :ictranslate::CLanguageDialog(IDD_MINIVIEW_DIALOG, pParent, &m_bLock), - m_spTaskMgrStats(new chcore::TTaskManagerStatsSnapshot) + m_iLastHeight(0), + m_bShown(false), + m_pTasks(pTaskManager), + m_bActive(false), + m_iIndex(-1), + m_pbHide(pbHide) { COLORREF cr3DFace = GetSysColor(COLOR_3DFACE); m_brBackground.CreateSolidBrush(cr3DFace); - m_iLastHeight=0; - m_bShown=false; - m_pTasks=pArray; - m_bActive=false; - m_iIndex=-1; - m_pbHide=pbHide; } - void CMiniViewDlg::DoDataExchange(CDataExchange* pDX) { CLanguageDialog::DoDataExchange(pDX); @@ -195,17 +193,19 @@ if(!m_pTasks) return; - m_pTasks->GetStatsSnapshot(m_spTaskMgrStats); + chcore::TTaskManagerStatsSnapshotPtr spTaskMgrStats(new chcore::TTaskManagerStatsSnapshot); + m_pTasks->GetStatsSnapshot(spTaskMgrStats); + int index=0; _PROGRESSITEM_* pItem=NULL; if(GetPropValue(GetConfig())) { - size_t stTasksCount = m_spTaskMgrStats->GetTaskStatsCount(); + size_t stTasksCount = spTaskMgrStats->GetTaskStatsCount(); for(size_t stIndex = 0; stIndex < stTasksCount; ++stIndex) { - chcore::TTaskStatsSnapshotPtr spTaskStats = m_spTaskMgrStats->GetTaskStatsAt(stIndex); + chcore::TTaskStatsSnapshotPtr spTaskStats = spTaskMgrStats->GetTaskStatsAt(stIndex); chcore::ETaskCurrentState eTaskState = spTaskStats->GetTaskState(); if(eTaskState != chcore::eTaskState_Finished && eTaskState != chcore::eTaskState_Cancelled && eTaskState != chcore::eTaskState_LoadError) @@ -274,7 +274,7 @@ pItem=m_ctlStatus.GetItemAddress(index++); pItem->m_crColor=GetSysColor(COLOR_HIGHLIGHT); pItem->m_strText=GetResManager().LoadString(IDS_MINIVIEWALL_STRING); - pItem->m_uiPos = boost::numeric_cast(m_spTaskMgrStats->GetCombinedProgress() * 100.0); + pItem->m_uiPos = boost::numeric_cast(spTaskMgrStats->GetCombinedProgress() * 100.0); pItem->m_tTaskID = chcore::NoTaskID; // get rid of the rest Index: src/ch/MiniViewDlg.h =================================================================== diff -u -rbeaf6c76a528f2bcf42efa705770079fd84c0156 -rc5252ea6f56ae2094a1f46fce4900f4e7be61a17 --- src/ch/MiniViewDlg.h (.../MiniViewDlg.h) (revision beaf6c76a528f2bcf42efa705770079fd84c0156) +++ src/ch/MiniViewDlg.h (.../MiniViewDlg.h) (revision c5252ea6f56ae2094a1f46fce4900f4e7be61a17) @@ -94,7 +94,6 @@ private: // from CMainWnd chcore::TTaskManager *m_pTasks; - chcore::TTaskManagerStatsSnapshotPtr m_spTaskMgrStats; CBrush m_brBackground; int m_iLastHeight;