Index: src/ch/FeedbackHandler.cpp =================================================================== diff -u -r44a2ec5f1eb0a435b56daef42ef5fe3b7a91da0d -r5d8ca703882285442606338c1acfc5fff6084e59 --- src/ch/FeedbackHandler.cpp (.../FeedbackHandler.cpp) (revision 44a2ec5f1eb0a435b56daef42ef5fe3b7a91da0d) +++ src/ch/FeedbackHandler.cpp (.../FeedbackHandler.cpp) (revision 5d8ca703882285442606338c1acfc5fff6084e59) @@ -60,7 +60,7 @@ CFeedbackReplaceDlg dlg(spSrcFileInfo, spDstFileInfo); eResult = (EFeedbackResult)dlg.DoModal(); - if(dlg.m_bAllItems) + if(dlg.IsApplyToAllItemsChecked()) SetFileAlreadyExistsPermanentResponse(eResult); return TFeedbackResult(eResult, false); Index: src/ch/FeedbackReplaceDlg.cpp =================================================================== diff -u -r4d1f8110906889d56552771fb58a6de86bc54a29 -r5d8ca703882285442606338c1acfc5fff6084e59 --- src/ch/FeedbackReplaceDlg.cpp (.../FeedbackReplaceDlg.cpp) (revision 4d1f8110906889d56552771fb58a6de86bc54a29) +++ src/ch/FeedbackReplaceDlg.cpp (.../FeedbackReplaceDlg.cpp) (revision 5d8ca703882285442606338c1acfc5fff6084e59) @@ -30,8 +30,17 @@ ictranslate::CLanguageDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_SRC_ICON_STATIC, m_ctlSrcIcon); DDX_Control(pDX, IDC_DST_ICON_STATIC, m_ctlDstIcon); - DDX_Control(pDX, IDC_SRC_INFO_STATIC, m_ctlSrcInfo); - DDX_Control(pDX, IDC_DST_INFO_STATIC, m_ctlDstInfo); + + DDX_Control(pDX, IDC_SRC_FILENAME_EDIT, m_ctlSrcName); + DDX_Control(pDX, IDC_SRC_PATH_EDIT, m_ctlSrcPath); + DDX_Control(pDX, IDC_SRC_MODIFIEDDATE_EDIT, m_ctlSrcDate); + DDX_Control(pDX, IDC_SRC_FILESIZE_EDIT, m_ctlSrcSize); + + DDX_Control(pDX, IDC_DST_FILENAME_EDIT, m_ctlDstName); + DDX_Control(pDX, IDC_DST_PATH_EDIT, m_ctlDstPath); + DDX_Control(pDX, IDC_DST_MODIFIEDDATE_EDIT, m_ctlDstDate); + DDX_Control(pDX, IDC_DST_FILESIZE_EDIT, m_ctlDstSize); + DDX_Check(pDX, IDC_ALL_ITEMS_CHECK, m_bAllItems); } @@ -55,12 +64,20 @@ AddResizableControl(IDC_00_STATIC, 0.0, 0.0, 1.0, 0.0); AddResizableControl(IDC_SRC_ICON_STATIC, 0.0, 0.0, 0.0, 0.0); - AddResizableControl(IDC_SRC_INFO_STATIC, 0.0, 0.0, 1.0, 0.5); + AddResizableControl(IDC_SRC_FILENAME_EDIT, 0.0, 0.0, 1.0, 0.0); + AddResizableControl(IDC_SRC_PATH_EDIT, 0.0, 0.0, 1.0, 0.0); + AddResizableControl(IDC_SRC_FILESIZE_EDIT, 0.0, 0.0, 1.0, 0.0); + AddResizableControl(IDC_SRC_MODIFIEDDATE_EDIT, 0.0, 0.0, 1.0, 0.0); + AddResizableControl(IDC_01_STATIC, 0.0, 0.5, 1.0, 0.0); AddResizableControl(IDC_DST_ICON_STATIC, 0.0, 0.5, 0.0, 0.0); - AddResizableControl(IDC_DST_INFO_STATIC, 0.0, 0.5, 1.0, 0.5); + AddResizableControl(IDC_DST_FILENAME_EDIT, 0.0, 1.0, 1.0, 0.0); + AddResizableControl(IDC_DST_PATH_EDIT, 0.0, 1.0, 1.0, 0.0); + AddResizableControl(IDC_DST_FILESIZE_EDIT, 0.0, 1.0, 1.0, 0.0); + AddResizableControl(IDC_DST_MODIFIEDDATE_EDIT, 0.0, 1.0, 1.0, 0.0); + AddResizableControl(IDC_COPY_REST_BUTTON, 0.0, 1.0, 0.0, 0.0); AddResizableControl(IDC_SKIP_BUTTON, 0.0, 1.0, 0.0, 0.0); AddResizableControl(IDC_PAUSE_BUTTON, 0.0, 1.0, 0.0, 0.0); @@ -85,28 +102,58 @@ ictranslate::CResourceManager& rManager = GetResManager(); CString strTemplate; - strTemplate += rManager.LoadString(IDS_INFO_FILE_STRING); - strTemplate += _T("\r\n"); - strTemplate += rManager.LoadString(IDS_INFO_SIZE_STRING); - strTemplate += _T("\r\n"); - strTemplate += rManager.LoadString(IDS_INFO_MODIFIED_STRING); + ///////////////////////////////////////////////////////////// + // src file + chcore::TSmartPath pathSrc = m_rSrcFile.GetFullFilePath(); + + // name + m_ctlSrcName.SetWindowText(pathSrc.GetFileName().ToString()); + + // path + strTemplate = rManager.LoadString(IDS_INFO_PATH_STRING); ictranslate::CFormat fmt(strTemplate); - fmt.SetParam(_T("%filename"), m_rSrcFile.GetFullFilePath().ToString()); + fmt.SetParam(_T("%pathname"), pathSrc.GetParent().ToString()); + m_ctlSrcPath.SetWindowText(fmt); + + // size + strTemplate = rManager.LoadString(IDS_INFO_SIZE_STRING); + fmt.SetFormat(strTemplate); fmt.SetParam(_T("%size"), m_rSrcFile.GetLength64()); + m_ctlSrcSize.SetWindowText(fmt); + // modified date + strTemplate = rManager.LoadString(IDS_INFO_MODIFIED_STRING); + fmt.SetFormat(strTemplate); COleDateTime dtTemp = m_rSrcFile.GetLastWriteTime().GetAsFiletime(); fmt.SetParam(_T("%datemod"), dtTemp.Format(LOCALE_NOUSEROVERRIDE, LANG_USER_DEFAULT)); + m_ctlSrcDate.SetWindowText(fmt); - m_ctlSrcInfo.SetWindowText(fmt); + ///////////////////////////////////////////////////////////// + // dst file + chcore::TSmartPath pathDst = m_rDstFile.GetFullFilePath(); + // name + m_ctlDstName.SetWindowText(pathDst.GetFileName().ToString()); + + // path + strTemplate = rManager.LoadString(IDS_INFO_PATH_STRING); fmt.SetFormat(strTemplate); - fmt.SetParam(_T("%filename"), m_rDstFile.GetFullFilePath().ToString()); + fmt.SetParam(_T("%pathname"), pathDst.GetParent().ToString()); + m_ctlDstPath.SetWindowText(fmt); + + // size + strTemplate = rManager.LoadString(IDS_INFO_SIZE_STRING); + fmt.SetFormat(strTemplate); fmt.SetParam(_T("%size"), m_rDstFile.GetLength64()); + m_ctlDstSize.SetWindowText(fmt); + + // modified date + strTemplate = rManager.LoadString(IDS_INFO_MODIFIED_STRING); + fmt.SetFormat(strTemplate); dtTemp = m_rDstFile.GetLastWriteTime().GetAsFiletime(); fmt.SetParam(_T("%datemod"), dtTemp.Format(LOCALE_NOUSEROVERRIDE, LANG_USER_DEFAULT)); - - m_ctlDstInfo.SetWindowText(fmt); + m_ctlDstDate.SetWindowText(fmt); } void CFeedbackReplaceDlg::RefreshImages() @@ -150,3 +197,8 @@ UpdateData(TRUE); EndDialog(chcore::EFeedbackResult::eResult_Cancel); } + +bool CFeedbackReplaceDlg::IsApplyToAllItemsChecked() const +{ + return m_bAllItems != FALSE; +} Index: src/ch/FeedbackReplaceDlg.h =================================================================== diff -u -r4d1f8110906889d56552771fb58a6de86bc54a29 -r5d8ca703882285442606338c1acfc5fff6084e59 --- src/ch/FeedbackReplaceDlg.h (.../FeedbackReplaceDlg.h) (revision 4d1f8110906889d56552771fb58a6de86bc54a29) +++ src/ch/FeedbackReplaceDlg.h (.../FeedbackReplaceDlg.h) (revision 5d8ca703882285442606338c1acfc5fff6084e59) @@ -29,6 +29,8 @@ virtual BOOL OnInitDialog(); + bool IsApplyToAllItemsChecked() const; + protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support @@ -37,11 +39,20 @@ DECLARE_MESSAGE_MAP() - public: +private: CStatic m_ctlSrcIcon; CStatic m_ctlDstIcon; - CStatic m_ctlSrcInfo; - CStatic m_ctlDstInfo; + + CEdit m_ctlSrcName; + CEdit m_ctlSrcPath; + CEdit m_ctlSrcSize; + CEdit m_ctlSrcDate; + + CEdit m_ctlDstName; + CEdit m_ctlDstPath; + CEdit m_ctlDstSize; + CEdit m_ctlDstDate; + BOOL m_bAllItems; protected: Index: src/ch/ch.rc =================================================================== diff -u -re2680c5f62127570e7e9b8d943f7838db49d4a63 -r5d8ca703882285442606338c1acfc5fff6084e59 --- src/ch/ch.rc (.../ch.rc) (revision e2680c5f62127570e7e9b8d943f7838db49d4a63) +++ src/ch/ch.rc (.../ch.rc) (revision 5d8ca703882285442606338c1acfc5fff6084e59) @@ -391,29 +391,35 @@ LTEXT "Update channel:",IDC_UPDATECHANNEL_STATIC,160,89,138,8 LTEXT "Check for updates:",IDC_CHECKFORUPDATESFREQ_STATIC,7,89,62,8 COMBOBOX IDC_UPDATESFREQ_COMBO,7,101,142,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "",IDC_CHANGELOG_RICHEDIT,"RichEdit20W",ES_MULTILINE | ES_READONLY | ES_NUMBER | WS_VSCROLL | WS_TABSTOP,51,25,247,56 + CONTROL "",IDC_CHANGELOG_RICHEDIT,"RichEdit20W",WS_VSCROLL | WS_TABSTOP | 0x2804,51,25,247,56 ICON "",IDC_ICON_STATIC,15,15,20,20 CONTROL "Custom1",IDC_MAINUPDATEINFO_CUSTOM,"STATICEX",0x30,47,7,251,14 END -IDD_FEEDBACK_REPLACE_DIALOG DIALOGEX 0, 0, 273, 159 +IDD_FEEDBACK_REPLACE_DIALOG DIALOGEX 0, 0, 319, 184 STYLE DS_SETFONT | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME CAPTION "File already exists" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - LTEXT "File you are trying to copy already exists. What do you want to do ?",IDC_INFO_STATIC,7,7,259,15 - PUSHBUTTON "&Replace",IDC_REPLACE_BUTTON,7,124,50,14 - PUSHBUTTON "&Copy rest",IDC_COPY_REST_BUTTON,60,124,50,14 - CONTROL "&Apply to all items",IDC_ALL_ITEMS_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,142,259,10 - PUSHBUTTON "&Skip",IDC_SKIP_BUTTON,111,124,50,14 - PUSHBUTTON "&Pause",IDC_PAUSE_BUTTON,163,124,50,14 - PUSHBUTTON "&Cancel",IDC_CANCEL_BUTTON,216,124,50,14 - ICON "",IDC_SRC_ICON_STATIC,21,36,21,20 - ICON "",IDC_DST_ICON_STATIC,21,86,21,20 - LTEXT "",IDC_SRC_INFO_STATIC,60,32,206,36 - LTEXT "",IDC_DST_INFO_STATIC,60,81,206,36 - LTEXT "File being copied:",IDC_00_STATIC,14,20,250,8 - LTEXT "Existing file:",IDC_01_STATIC,16,70,250,8 + PUSHBUTTON "&Replace",IDC_REPLACE_BUTTON,8,146,60,14 + PUSHBUTTON "&Append",IDC_COPY_REST_BUTTON,69,146,60,14 + PUSHBUTTON "&Skip",IDC_SKIP_BUTTON,130,146,60,14 + PUSHBUTTON "&Pause",IDC_PAUSE_BUTTON,191,146,60,14 + PUSHBUTTON "&Cancel",IDC_CANCEL_BUTTON,252,146,60,14 + CONTROL "&Apply to all items",IDC_ALL_ITEMS_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,167,305,10 + EDITTEXT IDC_SRC_FILENAME_EDIT,54,31,258,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + EDITTEXT IDC_SRC_PATH_EDIT,54,42,258,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + EDITTEXT IDC_SRC_FILESIZE_EDIT,54,53,258,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + EDITTEXT IDC_SRC_MODIFIEDDATE_EDIT,54,64,258,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + EDITTEXT IDC_DST_FILENAME_EDIT,54,95,258,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + EDITTEXT IDC_DST_PATH_EDIT,54,106,258,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + EDITTEXT IDC_DST_FILESIZE_EDIT,54,117,258,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + EDITTEXT IDC_DST_MODIFIEDDATE_EDIT,54,128,258,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + LTEXT "File you are trying to copy already exists. What do you want to do?",IDC_INFO_STATIC,7,7,305,15 + ICON "",IDC_SRC_ICON_STATIC,21,36,20,20 + ICON "",IDC_DST_ICON_STATIC,21,100,20,20 + LTEXT "Source file:",IDC_00_STATIC,14,20,298,8 + LTEXT "Destination file:",IDC_01_STATIC,16,82,296,8 END @@ -548,9 +554,9 @@ IDD_FEEDBACK_REPLACE_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 266 + RIGHTMARGIN, 312 TOPMARGIN, 7 - BOTTOMMARGIN, 152 + BOTTOMMARGIN, 177 END END #endif // APSTUDIO_INVOKED @@ -682,7 +688,7 @@ 2 TEXTINCLUDE BEGIN - "#define _USING_V110_SDK71_ 1" + "#define _USING_V110_SDK71_ 1\r\n" "#include ""afxres.h""\r\n" "\0" END @@ -722,7 +728,12 @@ 0 END +IDD_FEEDBACK_REPLACE_DIALOG AFX_DIALOG_LAYOUT +BEGIN + 0 +END + ///////////////////////////////////////////////////////////////////////////// // // String Table @@ -1155,7 +1166,7 @@ IDS_BDDIR_STRING "Directory" IDS_BDTREE_STRING "Tree" IDS_BDNDSCONTAINER_STRING "NDS Container" - IDS_INFO_FILE_STRING "File: %filename" + IDS_INFO_PATH_STRING "Location: %pathname" IDS_INFO_SIZE_STRING "Size: %size" IDS_INFO_MODIFIED_STRING "Modified: %datemod" END @@ -1182,7 +1193,8 @@ STRINGTABLE BEGIN - IDS_UPDATER_EQUAL_VERSION_STRING "Your current version: %thisver (%thisnumericver)" + IDS_UPDATER_EQUAL_VERSION_STRING + "Your current version: %thisver (%thisnumericver)" IDS_UPDATER_ERROR_STRING "Check for updates error" IDS_UPDATER_WAITING_STRING "Connecting with %site..." IDS_SHELL_EXTENSION_MISMATCH_STRING Index: src/ch/resource.h =================================================================== diff -u -r501360c5c84079dd290b59ca7904c84bad7e38f9 -r5d8ca703882285442606338c1acfc5fff6084e59 --- src/ch/resource.h (.../resource.h) (revision 501360c5c84079dd290b59ca7904c84bad7e38f9) +++ src/ch/resource.h (.../resource.h) (revision 5d8ca703882285442606338c1acfc5fff6084e59) @@ -129,6 +129,7 @@ #define IDC_QUICK_ACCESS_LIST 1054 #define IDC_PATH_EDIT 1055 #define IDC_HEADER_TEXT_STATIC 1056 +#define IDC_DST_PATH_EDIT 1056 #define IDC_FIND_PATH_BUTTON 1057 #define IDC_NEW_FOLDER_BUTTON 1058 #define IDC_PATH_STATIC 1059 @@ -323,8 +324,6 @@ #define IDC_SKIP_BUTTON 1288 #define IDC_SRC_ICON_STATIC 1291 #define IDC_DST_ICON_STATIC 1292 -#define IDC_SRC_INFO_STATIC 1293 -#define IDC_DST_INFO_STATIC 1294 #define IDC_DESC_STATIC 1297 #define IDC_00_STATIC 1298 #define IDC_01_STATIC 1299 @@ -366,6 +365,14 @@ #define IDC_RELESENOTES_STATIC 1332 #define IDC_CHECKFORUPDATESFREQ_STATIC 1333 #define IDC_UPDATECHANNEL_STATIC 1334 +#define IDC_SRC_FILENAME_EDIT 1340 +#define IDC_DST_FILENAME_EDIT 1341 +#define IDC_SRC_FILESIZE_EDIT 1342 +#define IDC_MODIFIEDDATE_EDIT 1343 +#define IDC_SRC_MODIFIEDDATE_EDIT 1343 +#define IDC_DST_FILESIZE_EDIT 1344 +#define IDC_DST_MODIFIEDDATE_EDIT 1345 +#define IDC_SRC_PATH_EDIT 1346 #define IDS_APPNAME_STRING 5000 #define IDS_PRIORITY0_STRING 5001 #define IDS_PRIORITY1_STRING 5002 @@ -571,7 +578,7 @@ #define IDS_BDDIR_STRING 13034 #define IDS_BDTREE_STRING 13035 #define IDS_BDNDSCONTAINER_STRING 13036 -#define IDS_INFO_FILE_STRING 13037 +#define IDS_INFO_PATH_STRING 13037 #define IDS_INFO_SIZE_STRING 13038 #define IDS_INFO_MODIFIED_STRING 13039 #define IDS_INFO_REASON_STRING 13040 @@ -695,9 +702,9 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 219 +#define _APS_NEXT_RESOURCE_VALUE 221 #define _APS_NEXT_COMMAND_VALUE 32819 -#define _APS_NEXT_CONTROL_VALUE 1335 +#define _APS_NEXT_CONTROL_VALUE 1347 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif