Index: src/ch/CfgProperties.h =================================================================== diff -u -rfdf4929dc7df1376ed439b7271765f1a4ca31de6 -rf25056c67d674c9491c8b23354236a253037132d --- src/ch/CfgProperties.h (.../CfgProperties.h) (revision fdf4929dc7df1376ed439b7271765f1a4ca31de6) +++ src/ch/CfgProperties.h (.../CfgProperties.h) (revision f25056c67d674c9491c8b23354236a253037132d) @@ -41,7 +41,6 @@ PP_PLANGUAGE, PP_STATUSREFRESHINTERVAL, - PP_STATUSSHOWDETAILS, PP_STATUSAUTOREMOVEFINISHED, PP_FDWIDTH, @@ -183,7 +182,6 @@ // GUI PROPERTY_MINMAX(PP_STATUSREFRESHINTERVAL, unsigned int, _T("CHConfig.GUI.StatusDialog.RefreshInterval"), 1000, 0, 24*Hour); -PROPERTY(PP_STATUSSHOWDETAILS, bool, _T("CHConfig.GUI.StatusDialog.ShowDetails"), true); PROPERTY(PP_STATUSAUTOREMOVEFINISHED, bool, _T("CHConfig.GUI.StatusDialog.AutoRemoveFinishedTasks"), false); PROPERTY_MINMAX(PP_FDWIDTH, int, _T("CHConfig.GUI.FolderDialog.Width"), -1, -1, 32767); Index: src/ch/OptionsDlg.cpp =================================================================== diff -u -r6df9b4cff81dedf8c5571a98702b584b061eac09 -rf25056c67d674c9491c8b23354236a253037132d --- src/ch/OptionsDlg.cpp (.../OptionsDlg.cpp) (revision 6df9b4cff81dedf8c5571a98702b584b061eac09) +++ src/ch/OptionsDlg.cpp (.../OptionsDlg.cpp) (revision f25056c67d674c9491c8b23354236a253037132d) @@ -247,7 +247,6 @@ ///////////////// PROP_SEPARATOR(IDS_STATUSWINDOW_STRING); PROP_UINT(IDS_REFRESHSTATUSINTERVAL_STRING, GetPropValue(GetConfig())); - PROP_BOOL(IDS_STATUSSHOWDETAILS_STRING, GetPropValue(GetConfig())); PROP_BOOL(IDS_STATUSAUTOREMOVE_STRING, GetPropValue(GetConfig())); PROP_SEPARATOR(IDS_MINIVIEW_STRING); @@ -352,7 +351,6 @@ SKIP_SEPARATOR(iPosition); SetPropValue(rConfig, GetUintProp(iPosition++)); - SetPropValue(rConfig, GetBoolProp(iPosition++)); SetPropValue(rConfig, GetBoolProp(iPosition++)); SKIP_SEPARATOR(iPosition); Index: src/ch/StatusDlg.cpp =================================================================== diff -u -r12a1725bfd04b0f55fd0fda302975fdcd4174943 -rf25056c67d674c9491c8b23354236a253037132d --- src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision 12a1725bfd04b0f55fd0fda302975fdcd4174943) +++ src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision f25056c67d674c9491c8b23354236a253037132d) @@ -73,7 +73,6 @@ ON_WM_TIMER() ON_BN_CLICKED(IDC_PAUSE_BUTTON, OnPauseButton) ON_BN_CLICKED(IDC_CANCEL_BUTTON, OnCancelButton) - ON_BN_CLICKED(IDC_ROLL_UNROLL_BUTTON, OnRollUnrollButton) ON_BN_CLICKED(IDC_SET_PRIORITY_BUTTON, OnSetPriorityButton) ON_BN_CLICKED(IDC_SET_BUFFERSIZE_BUTTON, OnSetBuffersizeButton) ON_BN_CLICKED(IDC_START_ALL_BUTTON, OnStartAllButton) @@ -153,7 +152,7 @@ m_ctlProgressAll.SetRange32(0, 100); // change the size of a dialog - ApplyDisplayDetails(true); + StickDialogToScreenEdge(); // ApplyButtonsState(); // EnableControls(false); @@ -277,7 +276,7 @@ m_ctlStatusList.SetItem(&lvi); // right side update - if(spTask == m_spSelectedItem && GetPropValue(GetConfig())) + if(spTask == m_spSelectedItem) { // data that can be changed by a thread GetDlgItem(IDC_OPERATION_STATIC)->SetWindowText(strStatusText); // operation @@ -368,51 +367,16 @@ return chcore::TTaskPtr(); } -void CStatusDlg::OnRollUnrollButton() +void CStatusDlg::StickDialogToScreenEdge() { - // change settings in config dialog - SetPropValue(GetConfig(), !GetPropValue(GetConfig())); - - ApplyDisplayDetails(); -} - -void CStatusDlg::ApplyDisplayDetails(bool bInitial) -{ // get coord of screen and window CRect rcScreen, rect; SystemParametersInfo(SPI_GETWORKAREA, 0, &rcScreen, 0); GetWindowRect(&rect); - bool bDetails=GetPropValue(GetConfig()); - - // stick cause - if (rect.right == rcScreen.right && rect.bottom == rcScreen.bottom) - bInitial=true; - - GetDlgItem(IDC_ROLL_UNROLL_BUTTON)->SetWindowText(bDetails ? _T("<<") : _T(">>")); - - CRect list, progress; - m_ctlProgressAll.GetWindowRect(&progress); - ScreenToClient(&progress); - m_ctlStatusList.GetWindowRect(&list); - ScreenToClient(&list); - - // set dialog size - CRect destRect; - if (!bInitial) - { - destRect.left=0; - destRect.top=0; - destRect.right=bDetails ? progress.right+list.left+3*GetSystemMetrics(SM_CXBORDER) : list.right+list.left+3*GetSystemMetrics(SM_CXBORDER); - destRect.bottom=rect.Height(); - SetWindowPos(NULL, destRect.left, destRect.top, destRect.right, destRect.bottom, SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER); - } - else - { - SetWindowPos(NULL, rcScreen.right-(bDetails ? progress.right+list.left+3*GetSystemMetrics(SM_CXBORDER) : list.right+list.left+3*GetSystemMetrics(SM_CXBORDER)), - rcScreen.bottom-rect.Height(), (bDetails ? progress.right+list.left+3*GetSystemMetrics(SM_CXBORDER) : list.right+list.left+3*GetSystemMetrics(SM_CXBORDER)), - rect.Height(), SWP_NOOWNERZORDER | SWP_NOZORDER); - } + SetWindowPos(NULL, rcScreen.right-rect.Width(), + rcScreen.bottom-rect.Height(), rect.Width(), rect.Height(), + SWP_NOOWNERZORDER | SWP_NOZORDER); } void CStatusDlg::ApplyButtonsState() @@ -735,28 +699,25 @@ SetWindowText(m_szData); // refresh overall progress - if (GetPropValue(GetConfig())) - { - m_ctlProgressAll.SetPos(boost::numeric_cast(tTMStats.GetGlobalProgressInPercent())); - - // progress - count of processed data/count of data - strTemp=GetSizeString(tTMStats.GetProcessedSize(), m_szData, _MAX_PATH)+CString(_T("/")); - strTemp+=GetSizeString(tTMStats.GetTotalSize(), m_szData, _MAX_PATH); - GetDlgItem(IDC_OVERALL_PROGRESS_STATIC)->SetWindowText(strTemp); - - // transfer - if (m_i64LastAllTasksProcessed == 0) - m_i64LastAllTasksProcessed=tTMStats.GetProcessedSize(); - - if (dwCurrentTime-m_dwLastUpdate != 0) - strTemp=GetSizeString( (static_cast(tTMStats.GetProcessedSize()) - static_cast(m_i64LastAllTasksProcessed))/static_cast(static_cast(dwCurrentTime-m_dwLastUpdate)/1000.0), m_szData, _MAX_PATH); - else - strTemp=GetSizeString( 0ULL, m_szData, _MAX_PATH); - - GetDlgItem(IDC_OVERALL_TRANSFER_STATIC)->SetWindowText(strTemp+_T("/s")); + m_ctlProgressAll.SetPos(boost::numeric_cast(tTMStats.GetGlobalProgressInPercent())); + + // progress - count of processed data/count of data + strTemp=GetSizeString(tTMStats.GetProcessedSize(), m_szData, _MAX_PATH)+CString(_T("/")); + strTemp+=GetSizeString(tTMStats.GetTotalSize(), m_szData, _MAX_PATH); + GetDlgItem(IDC_OVERALL_PROGRESS_STATIC)->SetWindowText(strTemp); + + // transfer + if (m_i64LastAllTasksProcessed == 0) m_i64LastAllTasksProcessed=tTMStats.GetProcessedSize(); - m_dwLastUpdate=dwCurrentTime; - } + + if (dwCurrentTime-m_dwLastUpdate != 0) + strTemp=GetSizeString( (static_cast(tTMStats.GetProcessedSize()) - static_cast(m_i64LastAllTasksProcessed))/static_cast(static_cast(dwCurrentTime-m_dwLastUpdate)/1000.0), m_szData, _MAX_PATH); + else + strTemp=GetSizeString( 0ULL, m_szData, _MAX_PATH); + + GetDlgItem(IDC_OVERALL_TRANSFER_STATIC)->SetWindowText(strTemp+_T("/s")); + m_i64LastAllTasksProcessed=tTMStats.GetProcessedSize(); + m_dwLastUpdate=dwCurrentTime; // if selection's missing - hide controls if (m_ctlStatusList.GetSelectedCount() == 0) @@ -813,7 +774,7 @@ void CStatusDlg::OnStickButton() { - ApplyDisplayDetails(true); + StickDialogToScreenEdge(); } void CStatusDlg::SetBufferSizesString(UINT uiValue, int iIndex) Index: src/ch/StatusDlg.h =================================================================== diff -u -r1d8d51e0dd4d8ebcf0bd457d01fab984585220c0 -rf25056c67d674c9491c8b23354236a253037132d --- src/ch/StatusDlg.h (.../StatusDlg.h) (revision 1d8d51e0dd4d8ebcf0bd457d01fab984585220c0) +++ src/ch/StatusDlg.h (.../StatusDlg.h) (revision f25056c67d674c9491c8b23354236a253037132d) @@ -49,7 +49,6 @@ int GetImageFromStatus(chcore::ETaskCurrentState eState); void ApplyButtonsState(); - void ApplyDisplayDetails(bool bInitial=false); chcore::TTaskPtr GetSelectedItemPointer(); void AddTaskInfo(int nPos, const chcore::TTaskPtr& spTask, DWORD dwCurrentTime); @@ -65,11 +64,12 @@ void PrepareResizableControls(); CString GetStatusString(const chcore::TASK_DISPLAY_DATA& rTaskDisplayData); + void StickDialogToScreenEdge(); + virtual BOOL OnInitDialog(); afx_msg void OnTimer(UINT_PTR nIDEvent); afx_msg void OnPauseButton(); afx_msg void OnCancelButton(); - afx_msg void OnRollUnrollButton(); afx_msg void OnSetPriorityButton(); afx_msg void OnSetBuffersizeButton(); afx_msg void OnStartAllButton(); Index: src/ch/ch.rc =================================================================== diff -u -rcbe8851b4ff9b0f235e2c700174370b8884cb844 -rf25056c67d674c9491c8b23354236a253037132d --- src/ch/ch.rc (.../ch.rc) (revision cbe8851b4ff9b0f235e2c700174370b8884cb844) +++ src/ch/ch.rc (.../ch.rc) (revision f25056c67d674c9491c8b23354236a253037132d) @@ -195,7 +195,6 @@ PUSHBUTTON "Remove/all",IDC_REMOVE_FINISHED_BUTTON,79,229,71,14,0,0,HIDC_REMOVE_FINISHED_BUTTON PUSHBUTTON "Restart/all",IDC_RESTART_ALL_BUTTON,151,229,71,14,0,0,HIDC_RESTART_ALL_BUTTON PUSHBUTTON "",IDC_STICK_BUTTON,472,243,7,7,BS_CENTER | BS_VCENTER | BS_FLAT,0,HIDC_STICK_BUTTON - PUSHBUTTON "&<<",IDC_ROLL_UNROLL_BUTTON,212,7,19,12,NOT WS_VISIBLE,0,HIDC_ROLL_UNROLL_BUTTON PUSHBUTTON "...",IDC_SET_BUFFERSIZE_BUTTON,459,72,13,14,0,0,HIDC_SET_BUFFERSIZE_BUTTON PUSHBUTTON ">",IDC_SET_PRIORITY_BUTTON,459,88,13,14,0,0,HIDC_SET_PRIORITY_BUTTON PUSHBUTTON "View log",IDC_SHOW_LOG_BUTTON,249,167,223,14,0,0,HIDC_SHOW_LOG_BUTTON Index: src/ch/resource.hm =================================================================== diff -u -re912e0a6b456c2eed24bec7303a908d3ff0aa59a -rf25056c67d674c9491c8b23354236a253037132d --- src/ch/resource.hm (.../resource.hm) (revision e912e0a6b456c2eed24bec7303a908d3ff0aa59a) +++ src/ch/resource.hm (.../resource.hm) (revision f25056c67d674c9491c8b23354236a253037132d) @@ -98,7 +98,6 @@ #define HIDC_RESTART_BUTTON 0x80830412 // IDD_STATUS_DIALOG [Angielski (Stany Zjednoczone)] #define HIDC_RESUME_BUTTON 0x808303fd // IDD_STATUS_DIALOG [Angielski (Stany Zjednoczone)] #define HIDC_RETRY_BUTTON 0x80a7044c // IDD_FEEDBACK_FILE_ERROR_DIALOG [Angielski (Stany Zjednoczone)] -#define HIDC_ROLL_UNROLL_BUTTON 0x8083040e // IDD_STATUS_DIALOG [Angielski (Stany Zjednoczone)] #define HIDC_SET_BUFFERSIZE_BUTTON 0x808303f5 // IDD_STATUS_DIALOG [Angielski (Stany Zjednoczone)] #define HIDC_SET_PRIORITY_BUTTON 0x808303f8 // IDD_STATUS_DIALOG [Angielski (Stany Zjednoczone)] #define HIDC_SHORTCUT_LIST 0x80d0049c // IDD_SHORTCUTEDIT_DIALOG [Angielski (Stany Zjednoczone)]