Index: Copy Handler/COPY HANDLER.cpp =================================================================== diff -u -r7d997aef1e72f049ed1bc199e1b765d737d9963a -r009f23e5403b3c15bfceaab29e03f45ebdc50ab0 --- Copy Handler/COPY HANDLER.cpp (.../COPY HANDLER.cpp) (revision 7d997aef1e72f049ed1bc199e1b765d737d9963a) +++ Copy Handler/COPY HANDLER.cpp (.../COPY HANDLER.cpp) (revision 009f23e5403b3c15bfceaab29e03f45ebdc50ab0) @@ -118,7 +118,8 @@ return (LRESULT)TRUE; } -CCopyHandlerApp::CCopyHandlerApp() +CCopyHandlerApp::CCopyHandlerApp() : + m_lfLog(true) { m_pMainWindow=NULL; m_szHelpPath[0]=_T('\0'); @@ -143,7 +144,6 @@ } } - CCopyHandlerApp* GetApp() { return &theApp; @@ -158,11 +158,11 @@ { return &theApp.m_cfgManager; } - +/* CLogFile* GetLog() { return &theApp.m_lfLog; -} +}*/ int MsgBox(UINT uiID, UINT nType, UINT nIDHelp) { @@ -236,11 +236,14 @@ // initialize log file m_cfgManager.GetStringValue(PP_LOGPATH, szPath, _MAX_PATH); - m_lfLog.EnableLogging(m_cfgManager.GetBoolValue(PP_LOGENABLELOGGING)); + m_lfLog.init(ExpandPath(szPath), m_cfgManager.GetIntValue(PP_LOGMAXLIMIT), LT_DEBUG, false, false); + + // TODO: remove unused properties from configuration +/* m_lfLog.EnableLogging(m_cfgManager.GetBoolValue(PP_LOGENABLELOGGING)); m_lfLog.SetPreciseLimiting(m_cfgManager.GetBoolValue(PP_LOGPRECISELIMITING)); m_lfLog.SetSizeLimit(m_cfgManager.GetBoolValue(PP_LOGLIMITATION), m_cfgManager.GetIntValue(PP_LOGMAXLIMIT)); m_lfLog.SetTruncateBufferSize(m_cfgManager.GetIntValue(PP_LOGTRUNCBUFFERSIZE)); - m_lfLog.Init(ExpandPath(szPath), GetResManager()); + m_lfLog.Init(ExpandPath(szPath), GetResManager());*/ #ifndef _DEBUG // for easier writing the program - doesn't collide with std CH // set "run with system" registry settings Index: Copy Handler/COPY HANDLER.h =================================================================== diff -u -r3e1186252ab31f63d86d86c4b0ff593cfffbefde -r009f23e5403b3c15bfceaab29e03f45ebdc50ab0 --- Copy Handler/COPY HANDLER.h (.../COPY HANDLER.h) (revision 3e1186252ab31f63d86d86c4b0ff593cfffbefde) +++ Copy Handler/COPY HANDLER.h (.../COPY HANDLER.h) (revision 009f23e5403b3c15bfceaab29e03f45ebdc50ab0) @@ -33,7 +33,8 @@ #include "ConfigManager.h" #include "CfgProperties.h" -#include "LogFile.h" +//#include "LogFile.h" +#include using namespace std; @@ -65,7 +66,7 @@ friend CCopyHandlerApp* GetApp(); friend CResourceManager* GetResManager(); friend CConfigManager* GetConfig(); - friend CLogFile* GetLog(); +// friend CLogFile* GetLog(); void OnConfigNotify(UINT uiType, LPARAM lParam); void OnResManNotify(UINT uiType, LPARAM lParam); @@ -76,7 +77,7 @@ public: CResourceManager m_resManager; CConfigManager m_cfgManager; - CLogFile m_lfLog; + icpf::log_file m_lfLog; CWnd *m_pMainWindow; // currently opened dialogs Index: Copy Handler/COPY HANDLER.rc =================================================================== diff -u -r3e1186252ab31f63d86d86c4b0ff593cfffbefde -r009f23e5403b3c15bfceaab29e03f45ebdc50ab0 --- Copy Handler/COPY HANDLER.rc (.../COPY HANDLER.rc) (revision 3e1186252ab31f63d86d86c4b0ff593cfffbefde) +++ Copy Handler/COPY HANDLER.rc (.../COPY HANDLER.rc) (revision 009f23e5403b3c15bfceaab29e03f45ebdc50ab0) @@ -1,4 +1,4 @@ -//Microsoft Developer Studio generated resource script. +// Microsoft Visual C++ generated resource script. // #include "resource.h" @@ -31,7 +31,7 @@ // 25 // -IDR_THANKS_TEXT 25 DISCARDABLE "res\\Thanks.txt" +IDR_THANKS_TEXT 25 "res\\Thanks.txt" ///////////////////////////////////////////////////////////////////////////// // @@ -40,46 +40,46 @@ // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDR_MAINFRAME ICON DISCARDABLE "res\\COPY HANDLER.ico" -IDI_ERROR_ICON ICON DISCARDABLE "res\\error.ico" -IDI_WORKING_ICON ICON DISCARDABLE "res\\working.ico" -IDI_PAUSED_ICON ICON DISCARDABLE "res\\paused.ico" -IDI_FINISHED_ICON ICON DISCARDABLE "res\\finished.ico" -IDI_CANCELLED_ICON ICON DISCARDABLE "res\\cancelled.ico" -IDI_WAITING_ICON ICON DISCARDABLE "res\\waiting.ico" -IDI_QUESTION_ICON ICON DISCARDABLE "res\\question.ico" -IDI_INFO_ICON ICON DISCARDABLE "res\\info.ico" -IDI_ERR_ICON ICON DISCARDABLE "res\\err.ico" -IDI_WARNING_ICON ICON DISCARDABLE "res\\warning.ico" -IDI_SHUTDOWN_ICON ICON DISCARDABLE "res\\shut.ico" -IDI_NET_ICON ICON DISCARDABLE "res\\net.ico" -IDI_HDD_ICON ICON DISCARDABLE "res\\hd.ico" -IDI_CD_ICON ICON DISCARDABLE "res\\cd.ico" -IDI_HDD2_ICON ICON DISCARDABLE "res\\HD2.ICO" -IDI_TRIBE_ICON ICON DISCARDABLE "res\\tribe.ico" -IDI_FOLDER_ICON ICON DISCARDABLE "res\\folder.ico" -IDI_ADDSHORTCUT_ICON ICON DISCARDABLE "res\\addshort.ico" -IDI_DELETESHORTCUT_ICON ICON DISCARDABLE "res\\delshort.ico" -IDI_LARGEICONS_ICON ICON DISCARDABLE "res\\large.ico" -IDI_LIST_ICON ICON DISCARDABLE "res\\list.ico" -IDI_NEWFOLDER_ICON ICON DISCARDABLE "res\\newdir.ico" -IDI_REPORT_ICON ICON DISCARDABLE "res\\report.ico" -IDI_SMALLICONS_ICON ICON DISCARDABLE "res\\small.ico" +IDR_MAINFRAME ICON "res\\COPY HANDLER.ico" +IDI_ERROR_ICON ICON "res\\error.ico" +IDI_WORKING_ICON ICON "res\\working.ico" +IDI_PAUSED_ICON ICON "res\\paused.ico" +IDI_FINISHED_ICON ICON "res\\finished.ico" +IDI_CANCELLED_ICON ICON "res\\cancelled.ico" +IDI_WAITING_ICON ICON "res\\waiting.ico" +IDI_QUESTION_ICON ICON "res\\question.ico" +IDI_INFO_ICON ICON "res\\info.ico" +IDI_ERR_ICON ICON "res\\err.ico" +IDI_WARNING_ICON ICON "res\\warning.ico" +IDI_SHUTDOWN_ICON ICON "res\\shut.ico" +IDI_NET_ICON ICON "res\\net.ico" +IDI_HDD_ICON ICON "res\\hd.ico" +IDI_CD_ICON ICON "res\\cd.ico" +IDI_HDD2_ICON ICON "res\\HD2.ICO" +IDI_TRIBE_ICON ICON "res\\tribe.ico" +IDI_FOLDER_ICON ICON "res\\folder.ico" +IDI_ADDSHORTCUT_ICON ICON "res\\addshort.ico" +IDI_DELETESHORTCUT_ICON ICON "res\\delshort.ico" +IDI_LARGEICONS_ICON ICON "res\\large.ico" +IDI_LIST_ICON ICON "res\\list.ico" +IDI_NEWFOLDER_ICON ICON "res\\newdir.ico" +IDI_REPORT_ICON ICON "res\\report.ico" +IDI_SMALLICONS_ICON ICON "res\\small.ico" ///////////////////////////////////////////////////////////////////////////// // // Menu // -IDR_ADVANCED_MENU MENU DISCARDABLE +IDR_ADVANCED_MENU MENU BEGIN POPUP "_ADVANCED_POPUP_" BEGIN MENUITEM "&Change paths...", ID_POPUP_REPLACE_PATHS END END -IDR_POPUP_MENU MENU DISCARDABLE +IDR_POPUP_MENU MENU BEGIN POPUP "POPUP" BEGIN @@ -102,7 +102,7 @@ END END -IDR_PRIORITY_MENU MENU DISCARDABLE +IDR_PRIORITY_MENU MENU BEGIN POPUP "_POPUP_" BEGIN @@ -123,8 +123,8 @@ // IDD_BUFFERSIZE_DIALOG DIALOGEX 0, 0, 344, 127 -STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | - WS_SYSMENU +STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | + WS_CAPTION | WS_SYSMENU CAPTION "Buffer size settings" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN @@ -175,8 +175,8 @@ END IDD_FEEDBACK_DSTFILE_DIALOG DIALOGEX 0, 0, 290, 111 -STYLE DS_SYSMODAL | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | - WS_CAPTION | WS_SYSMENU +STYLE DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | + WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Copy handler - error opening file" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN @@ -201,8 +201,8 @@ END IDD_FEEDBACK_IGNOREWAITRETRY_DIALOG DIALOGEX 0, 0, 294, 242 -STYLE DS_SYSMODAL | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | - WS_CAPTION | WS_SYSMENU +STYLE DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | + WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Copy handler - error opening file" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN @@ -252,8 +252,8 @@ END IDD_FEEDBACK_REPLACE_FILES_DIALOG DIALOGEX 0, 0, 294, 258 -STYLE DS_SYSMODAL | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | - WS_CAPTION | WS_SYSMENU +STYLE DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | + WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Copy handler - smaller destination file found" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN @@ -305,8 +305,8 @@ END IDD_FEEDBACK_SMALL_REPLACE_FILES_DIALOG DIALOGEX 0, 0, 294, 258 -STYLE DS_SYSMODAL | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | - WS_CAPTION | WS_SYSMENU +STYLE DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | + WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Copy handler - destination file found" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN @@ -354,8 +354,8 @@ END IDD_MINIVIEW_DIALOG DIALOGEX 0, 0, 90, 23 -STYLE DS_ABSALIGN | DS_SYSMODAL | DS_MODALFRAME | DS_SETFOREGROUND | - DS_CONTEXTHELP | WS_POPUP | WS_CAPTION +STYLE DS_ABSALIGN | DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | + DS_SETFOREGROUND | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION EXSTYLE WS_EX_TOOLWINDOW CAPTION "Status" FONT 8, "Tahoma", 0, 0, 0x1 @@ -366,8 +366,8 @@ END IDD_OPTIONS_DIALOG DIALOGEX 0, 0, 396, 214 -STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | - WS_SYSMENU +STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | + WS_CAPTION | WS_SYSMENU CAPTION "Options" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN @@ -383,8 +383,8 @@ END IDD_REPLACE_PATHS_DIALOG DIALOGEX 0, 0, 342, 148 -STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | - WS_SYSMENU +STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | + WS_CAPTION | WS_SYSMENU CAPTION "Partial replace of source paths" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN @@ -406,8 +406,8 @@ END IDD_STATUS_DIALOG DIALOGEX 0, 0, 478, 250 -STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_MINIMIZEBOX | WS_POPUP | - WS_VISIBLE | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU +STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_MINIMIZEBOX | + WS_POPUP | WS_VISIBLE | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "Status" FONT 8, "Tahoma", 0, 0, 0x1 @@ -446,8 +446,8 @@ PUSHBUTTON "View log",IDC_SHOW_LOG_BUTTON,249,116,60,14,0,0, HIDC_SHOW_LOG_BUTTON LTEXT "Operations list:",IDC_001_STATIC,7,7,197,8 - CONTROL "Progress1",IDC_ALL_PROGRESS,"msctls_progress32", - PBS_SMOOTH,312,234,159,9 + CONTROL "Progress1",IDC_ALL_PROGRESS,"msctls_progress32",0x1,312, + 234,159,9 LTEXT "Progress:",IDC_002_STATIC,249,235,62,8 CONTROL "Progress2",IDC_TASK_PROGRESS,"msctls_progress32",0x0, 312,181,159,6 @@ -501,8 +501,8 @@ END IDD_FEEDBACK_NOTENOUGHPLACE_DIALOG DIALOGEX 0, 0, 254, 138 -STYLE DS_SYSMODAL | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | - WS_CAPTION | WS_SYSMENU +STYLE DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | + WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Copy handler - not enough free space" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN @@ -525,8 +525,8 @@ END IDD_SHUTDOWN_DIALOG DIALOGEX 0, 0, 186, 86 -STYLE DS_SYSMODAL | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | - WS_CAPTION | WS_SYSMENU +STYLE DS_SYSMODAL | DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | + WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Copy handler" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN @@ -536,13 +536,13 @@ LTEXT "All copy/move operations were finished. Attempt to shut down the system will be performed in:", IDC_002_STATIC,37,7,142,24 CTEXT "",IDC_TIME_STATIC,7,35,172,8 - CONTROL "Progress1",IDC_TIME_PROGRESS,"msctls_progress32", - PBS_SMOOTH,7,48,172,9 + CONTROL "Progress1",IDC_TIME_PROGRESS,"msctls_progress32",0x1,7, + 48,172,9 END IDD_CUSTOM_COPY_DIALOG DIALOGEX 0, 0, 349, 319 -STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | - WS_SYSMENU +STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | + WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "Copying/moving parameters" FONT 8, "Tahoma", 0, 0, 0x1 @@ -620,8 +620,8 @@ END IDD_FILTER_DIALOG DIALOGEX 0, 0, 291, 266 -STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | - WS_SYSMENU +STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | + WS_CAPTION | WS_SYSMENU CAPTION "Filtering settings" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN @@ -707,8 +707,8 @@ END IDD_SHORTCUTEDIT_DIALOG DIALOGEX 0, 0, 324, 206 -STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | - WS_SYSMENU +STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | + WS_CAPTION | WS_SYSMENU CAPTION "Shortcuts editing" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN @@ -742,8 +742,8 @@ END IDD_RECENTEDIT_DIALOG DIALOGEX 0, 0, 324, 190 -STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | - WS_SYSMENU +STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | + WS_CAPTION | WS_SYSMENU CAPTION "Recent paths" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN @@ -769,8 +769,8 @@ END IDD_ABOUTBOX DIALOGEX 0, 0, 369, 249 -STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | - WS_SYSMENU +STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | + WS_CAPTION | WS_SYSMENU CAPTION "About ..." FONT 8, "Tahoma", 0, 0, 0x1 BEGIN @@ -787,35 +787,29 @@ NOT WS_BORDER | WS_VSCROLL,WS_EX_STATICEDGE, HIDC_THANX_EDIT CONTROL "http://www.copyhandler.com|http://www.copyhandler.com", - IDC_HOMEPAGELINK_STATIC,"STATICEX",0x1,257,7,105,8,0, - HIDC_HOMEPAGELINK_STATIC + IDC_HOMEPAGELINK_STATIC,"STATICEX",0x1,257,7,105,8 CONTROL "ixen@copyhandler.com|mailto:ixen@copyhandler.com", - IDC_CONTACT1LINK_STATIC,"STATICEX",0x1,257,41,105,8,0, - HIDC_CONTACT1LINK_STATIC + IDC_CONTACT1LINK_STATIC,"STATICEX",0x1,257,41,105,8 CONTROL "Page|http://groups.yahoo.com/group/copyhandler", - IDC_GENFORUMPAGELINK_STATIC,"STATICEX",0x1,155,124,33,8, - 0,HIDC_GENFORUMPAGELINK_STATIC + IDC_GENFORUMPAGELINK_STATIC,"STATICEX",0x1,155,124,33,8 CONTROL "Page|http://groups.yahoo.com/group/chdev", - IDC_DEVFORUMPAGELINK_STATIC,"STATICEX",0x1,155,137,33,8, - 0,HIDC_DEVFORUMPAGELINK_STATIC + IDC_DEVFORUMPAGELINK_STATIC,"STATICEX",0x1,155,137,33,8 CONTROL "Subscribe|mailto:copyhandler-subscribe@yahoogroups.com", IDC_GENFORUMSUBSCRIBELINK_STATIC,"STATICEX",0x1,198,124, - 44,8,0,HIDC_GENFORUMSUBSCRIBELINK_STATIC + 44,8 CONTROL "Subscribe|mailto:chdev-subscribe@yahoogroups.com", IDC_DEVFORUMSUBSCRIBELINK_STATIC,"STATICEX",0x1,198,137, - 44,8,0,HIDC_DEVFORUMSUBSCRIBELINK_STATIC + 44,8 CONTROL "Unsubscribe|mailto:copyhandler-unsubscribe@yahoogroups.com", IDC_GENFORUMUNSUBSCRIBELINK_STATIC,"STATICEX",0x1,251, - 124,48,8,0,HIDC_GENFORUMUNSUBSCRIBELINK_STATIC + 124,48,8 CONTROL "Unsubscribe|mailto:chdev-unsubscribe@yahoogroups.com", IDC_DEVFORUMUNSUBSCRIBELINK_STATIC,"STATICEX",0x1,251, - 137,48,8,0,HIDC_DEVFORUMUNSUBSCRIBELINK_STATIC + 137,48,8 CONTROL "Send message|mailto:copyhandler@yahoogroups.com", - IDC_GENFORUMSENDLINK_STATIC,"STATICEX",0x1,307,124,55,8, - 0,HIDC_GENFORUMSENDLINK_STATIC + IDC_GENFORUMSENDLINK_STATIC,"STATICEX",0x1,307,124,55,8 CONTROL "Send message|mailto:chdev@yahoogroups.com", - IDC_DEVFORUMSENDLINK_STATIC,"STATICEX",0x1,307,137,55,8, - 0,HIDC_DEVFORUMSENDLINK_STATIC + IDC_DEVFORUMSENDLINK_STATIC,"STATICEX",0x1,307,137,55,8 CONTROL "",IDC_PROGRAM_STATICEX,"STATICEX",0x30,39,7,122,10 CONTROL "",IDC_FULLVERSION_STATICEX,"STATICEX",0x10,39,20,109,8 CONTROL "Home page:",IDC_HOMEPAGE_STATICEX,"STATICEX",0x10,185,7, @@ -828,22 +822,18 @@ CONTROL "This program is free software and may be distributed according to the terms of the GNU General Public License.", IDC_LICENSE_STATICEX,"STATICEX",0x90,46,98,310,16 CONTROL "http://www.copyhandler.prv.pl|http://www.copyhandler.prv.pl", - IDC_HOMEPAGELINK2_STATIC,"STATICEX",0x1,257,17,105,8,0, - HIDC_HOMEPAGELINK2_STATIC + IDC_HOMEPAGELINK2_STATIC,"STATICEX",0x1,257,17,105,8 CONTROL "Author:",IDC_CONTACTAUTHOR_STATICEX,"STATICEX",0x50,185, 41,68,8 CONTROL "support@copyhandler.com|mailto:support@copyhandler.com", - IDC_CONTACT2LINK_STATIC,"STATICEX",0x1,257,55,105,8,0, - HIDC_CONTACT2LINK_STATIC + IDC_CONTACT2LINK_STATIC,"STATICEX",0x1,257,55,105,8 CONTROL "Support:",IDC_CONTACTSUPPORT_STATICEX,"STATICEX",0x50, 185,55,68,8 CONTROL "copyhandler@o2.pl|mailto:copyhandler@o2.pl", - IDC_CONTACT3LINK_STATIC,"STATICEX",0x1,257,66,105,8,0, - HIDC_CONTACT3LINK_STATIC + IDC_CONTACT3LINK_STATIC,"STATICEX",0x1,257,66,105,8 END -#ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version @@ -866,18 +856,18 @@ BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "Program for copying files/folders\0" - VALUE "CompanyName", " \0" - VALUE "FileDescription", "Copy Handler v. 1.28\0" + VALUE "Comments", "Program for copying files/folders" + VALUE "CompanyName", " " + VALUE "FileDescription", "Copy Handler v. 1.28" VALUE "FileVersion", "1.28.42.1074" - VALUE "InternalName", "Copy Handler\0" - VALUE "LegalCopyright", "Copyright (C) 2001-2004 Ixen Gerthannes\0" - VALUE "LegalTrademarks", " \0" - VALUE "OriginalFilename", "COPY HANDLER.EXE\0" - VALUE "PrivateBuild", " \0" - VALUE "ProductName", "Copy Handler v. 1.28\0" + VALUE "InternalName", "Copy Handler" + VALUE "LegalCopyright", "Copyright (C) 2001-2004 Ixen Gerthannes" + VALUE "LegalTrademarks", " " + VALUE "OriginalFilename", "COPY HANDLER.EXE" + VALUE "PrivateBuild", " " + VALUE "ProductName", "Copy Handler v. 1.28" VALUE "ProductVersion", "1.28.42.1074" - VALUE "SpecialBuild", " \0" + VALUE "SpecialBuild", " " END END BLOCK "VarFileInfo" @@ -886,16 +876,14 @@ END END -#endif // !_MAC - ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO MOVEABLE PURE +GUIDELINES DESIGNINFO BEGIN IDD_BUFFERSIZE_DIALOG, DIALOG BEGIN @@ -1033,7 +1021,7 @@ // Toolbar // -IDR_POPUP_TOOLBAR TOOLBAR MOVEABLE PURE 16, 15 +IDR_POPUP_TOOLBAR TOOLBAR 16, 15 BEGIN BUTTON ID_POPUP_OPTIONS END @@ -1044,33 +1032,33 @@ // Bitmap // -IDR_POPUP_TOOLBAR BITMAP MOVEABLE PURE "res\\main_toolbar.bmp" +IDR_POPUP_TOOLBAR BITMAP "res\\main_toolbar.bmp" ///////////////////////////////////////////////////////////////////////////// // -// 24 +// RT_MANIFEST // -IDR_MANIFEST 24 MOVEABLE PURE "res\\manifest.txt" +IDR_MANIFEST RT_MANIFEST "res\\manifest.txt" #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" @@ -1095,7 +1083,7 @@ // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ONECOPY_STRING "Cannot run the second instance of this program" IDS_REGISTEROK_STRING "Library chext.dll was registered successfully" @@ -1106,7 +1094,7 @@ IDS_HELPERR_STRING "Cannot open html help file:\n%s\n" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BROWSE_STRING "Choose path" IDS_BDREMOTENAME_STRING "Remote name: " @@ -1118,7 +1106,7 @@ IDS_BDCAPACITY_STRING "Capacity: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FILEDLGALLFILTER_STRING "All files (*)|*||" IDS_DSTFOLDERBROWSE_STRING "Choose destination folder" @@ -1130,7 +1118,7 @@ IDS_BSETWODISKS_STRING "Two disks: %s" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME_STRING "Copy Handler" IDS_PRIORITY0_STRING "Time critical" @@ -1142,12 +1130,12 @@ IDS_PRIORITY6_STRING "Idle" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MINIVIEWALL_STRING "All:" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRAM_STRING "Program" IDS_CLIPBOARDMONITORING_STRING "Clipboard monitoring" @@ -1167,7 +1155,7 @@ IDS_MINIVIEWSHOWAFTERSTART_STRING "Show at program startup" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CFGSHSHOWICONS_STRING "Show icons with shortcuts (experimental)" IDS_CFGSHOVERRIDEDRAG_STRING @@ -1188,7 +1176,7 @@ IDS_FORCESHUTDOWNVALUES_STRING "Normal!Force" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MINIVIEWAUTOHIDE_STRING "Hide when empty" IDS_PROCESSINGTHREAD_STRING "Copying/moving thread" @@ -1210,7 +1198,7 @@ "Don't delete files before copying finishes (moving)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CREATELOGFILES_STRING "Create .log files" IDS_SOUNDS_STRING "Sounds" @@ -1233,20 +1221,20 @@ IDS_FORCESHUTDOWN_STRING "Type of shutdown" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SOURCESTRINGMISSING_STRING "You didn't enter source text" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLUMNSTATUS_STRING "Status" IDS_COLUMNSOURCE_STRING "File" IDS_COLUMNDESTINATION_STRING "To:" IDS_COLUMNPROGRESS_STRING "Progress" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EMPTYOPERATIONTEXT_STRING "None of tasks selected" IDS_EMPTYSOURCETEXT_STRING "empty" @@ -1267,12 +1255,12 @@ IDS_NONEINPUTFILE_STRING "(waiting...)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUFFERSIZEZERO_STRING "Cannot operate with buffer of 0 size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTFSEARCHINGFORFILES_STRING "Searching for files..." IDS_OTFMISSINGCLIPBOARDINPUT_STRING @@ -1287,7 +1275,7 @@ IDS_OTFSEARCHINGFINISHED_STRING "Searching for files finished" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTFDELETINGFILES_STRING "Deleting files (DeleteFiles)..." IDS_OTFDELETINGKILLREQUEST_STRING @@ -1298,50 +1286,50 @@ IDS_OTFPRECHECKCANCELREQUEST_STRING "Cancel request while checking result of dialog before opening source file %s (CustomCopyFile)" IDS_OTFOPENINGERROR_STRING - "Error #%lu (%s) while opening source file %s (CustomCopyFile)" + "Error %err while opening source file %s (CustomCopyFile)" IDS_OTFOPENINGCANCELREQUEST_STRING - "Cancel request [error #%lu (%s)] while opening source file %s (CustomCopyFile)" + "Cancel request [error %err] while opening source file %s (CustomCopyFile)" IDS_OTFOPENINGWAITREQUEST_STRING - "Wait request [error #%lu (%s)] while opening source file %s (CustomCopyFile)" + "Wait request [error %err] while opening source file %s (CustomCopyFile)" IDS_OTFOPENINGRETRY_STRING - "Retrying [error #%lu (%s)] to open source file %s (CustomCopyFile)" + "Retrying [error %err] to open source file %s (CustomCopyFile)" IDS_OTFDESTOPENINGERROR_STRING - "Error #%lu (%s) while opening destination file %s (CustomCopyFile)" + "Error %err while opening destination file %s (CustomCopyFile)" IDS_OTFDESTOPENINGRETRY_STRING - "Retrying [error #%lu (%s)] to open destination file %s (CustomCopyFile)" + "Retrying [error %err] to open destination file %s (CustomCopyFile)" IDS_OTFDESTOPENINGCANCELREQUEST_STRING - "Cancel request [error #%lu (%s)] while opening destination file %s (CustomCopyFile)" + "Cancel request [error %err] while opening destination file %s (CustomCopyFile)" IDS_OTFDESTOPENINGWAITREQUEST_STRING - "Wait request [error #%lu (%s)] while opening destination file %s (CustomCopyFile)" + "Wait request [error %err] while opening destination file %s (CustomCopyFile)" IDS_OTFMOVINGPOINTERSERROR_STRING - "Error #%lu (%s) while moving file pointers of %s and %s to %I64u" + "Error %err while moving file pointers of %s and %s to %I64u" IDS_OTFRESTORINGPOINTERSERROR_STRING - "Error #%lu (%s) while restoring (moving to beginning) file pointers of %s and %s" + "Error %err while restoring (moving to beginning) file pointers of %s and %s" IDS_OTFSETTINGZEROSIZEERROR_STRING - "Error #%lu (%s) while setting size of file %s to 0" + "Error %err while setting size of file %s to 0" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTFCOPYINGKILLREQUEST_STRING "Kill request while main copying file %s -> %s" IDS_OTFCHANGINGBUFFERSIZE_STRING "Changing buffer size from [Def:%lu, One:%lu, Two:%lu, CD:%lu, LAN:%lu] to [Def:%lu, One:%lu, Two:%lu, CD:%lu, LAN:%lu] wile copying %s -> %s (CustomCopyFile)" IDS_OTFREADINGERROR_STRING - "Error #%lu (%s) while trying to read %d bytes from source file %s (CustomCopyFile)" + "Error %err while trying to read %d bytes from source file %s (CustomCopyFile)" IDS_OTFWRITINGERROR_STRING - "Error #%lu (%s) while trying to write %d bytes to destination file %s (CustomCopyFile)" + "Error %err while trying to write %d bytes to destination file %s (CustomCopyFile)" IDS_OTFCAUGHTEXCEPTIONCCF_STRING - "Caught exception in CustomCopyFile [last error: #%lu (%s)] (at time %lu)" + "Caught exception in CustomCopyFile [last error: %err] (at time %lu)" IDS_OTFPROCESSINGFILES_STRING "Processing files/folders (ProcessFiles)" IDS_OTFPROCESSINGFILESDATA_STRING "Processing files/folders (ProcessFiles):\r\n\tOnlyCreate: %d\r\n\tBufferSize: [Def:%lu, One:%lu, Two:%lu, CD:%lu, LAN:%lu]\r\n\tFiles/folders count: %lu\r\n\tCopies count: %d\r\n\tIgnore Folders: %d\r\n\tDest path: %s\r\n\tCurrent pass (0-based): %d\r\n\tCurrent index (0-based): %d" IDS_OTFPROCESSINGKILLREQUEST_STRING "Kill request while processing file in ProcessFiles" IDS_OTFMOVEFILEERROR_STRING - "Error #%lu (%s) while calling MoveFile %s -> %s (ProcessFiles)" + "Error %err while calling MoveFile %s -> %s (ProcessFiles)" IDS_OTFCREATEDIRECTORYERROR_STRING - "Error #%lu (%s) while calling CreateDirectory %s (ProcessFiles)" + "Error %err while calling CreateDirectory %s (ProcessFiles)" IDS_OTFPROCESSINGFINISHED_STRING "Finished processing in ProcessFiles" IDS_OTFTHREADSTART_STRING "\r\n# COPYING THREAD STARTED #\r\nBegan processing data (dd:mm:yyyy) %02d.%02d.%4d at %02d:%02d.%02d" @@ -1351,10 +1339,10 @@ IDS_OTFTHREADFINISHED_STRING "Finished processing data (dd:mm:yyyy) %02d.%02d.%4d at %02d:%02d.%02d" IDS_OTFCAUGHTEXCEPTIONMAIN_STRING - "Caught exception in ThrdProc [last error: %lu (%s), type: %d]" + "Caught exception in ThrdProc [last error: %err, type: %d]" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLECOPY_STRING "Copying..." IDS_TITLEMOVE_STRING "Moving..." @@ -1363,7 +1351,7 @@ IDS_MAINBROWSETEXT_STRING "Enter destination path for:\n" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COPYWORDLESSFIVE_STRING " copies" IDS_COPYWORDMOREFOUR_STRING " copies" @@ -1383,7 +1371,7 @@ IDS_BSDEFAULT_STRING "Default: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOPY_STRING "Copy of %s" IDS_NEXTCOPY_STRING "Copy (%d) of %s" @@ -1401,7 +1389,7 @@ IDS_GT_STRING ">" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTFCHECKINGSPACE_STRING "Checking for free space on destination disk..." @@ -1416,7 +1404,7 @@ "Cancel request while calling MoveFileEx %s -> %s (ProcessFiles)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BSONEDISK_STRING "One disk: " IDS_BSTWODISKS_STRING "Two disks: " @@ -1446,13 +1434,13 @@ "Selected task wasn't finished yet.\nDo you want to finish it now ?" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SHUTDOWNERROR_STRING "Cannot shutdown this operating system.\nEncountered error #%lu." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MINIVIEWSMOOTHPROGRESS_STRING "Use smooth progress bars" IDS_CFGFOLDERDIALOG_STRING "Choose folder dialog" @@ -1475,7 +1463,7 @@ IDS_CFGSHSHOWFREESPACE_STRING "Show free space with shortcuts' names" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BSECD_STRING "CD: %s" IDS_BSELAN_STRING "LAN: %s" @@ -1495,14 +1483,14 @@ IDS_IMPORTREPORT_STRING "Imported %lu path(s)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DATECREATED_STRING "Date of creation" IDS_DATELASTWRITE_STRING "Date of last write" IDS_DATEACCESSED_STRING "Date of last access" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MENUCOPY_STRING "(CH) Copy here" IDS_MENUMOVE_STRING "(CH) Move here" @@ -1514,7 +1502,7 @@ IDS_MENUCOPYMOVETOSPECIAL_STRING "(CH) Copy/move special to..." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MENUTIPCOPY_STRING "Copies data here with Copy Handler" IDS_MENUTIPMOVE_STRING "Moves data here with Copy Handler" @@ -1529,7 +1517,7 @@ "Copies/moves selected data into specified folder with additional settings" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CFGFDSHORTCUTSSTYLES_STRING "Large icons!Small icons!List!Report" IDS_CFGPRIORITYCLASSITEMS_STRING "Idle!Normal!High!Real-time" @@ -1548,13 +1536,13 @@ IDS_LANGSFOLDERCHOOSE_STRING "!Choose folder with language files" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SHORTCUTNAME_STRING "Shortcut's name" IDS_SHORTCUTPATH_STRING "Path" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BDOK_STRING "&OK" IDS_BDCANCEL_STRING "&Cancel" @@ -1575,7 +1563,7 @@ IDS_BDDETAILS_STRING "Details" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BDADDSHORTCUT_STRING "Add to shortcut's list" IDS_BDREMOVESHORTCUT_STRING "Remove from shortcut's list" @@ -1592,14 +1580,14 @@ IDS_BDNDSCONTAINER_STRING "NDS Container" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ABOUTVERSION_STRING "Compilation: %s" IDS_LANGCODE_STRING "Code=" IDS_LANGVER_STRING "Version=" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NERPATH_STRING "There is not enough room in %s to copy or move:" END Index: Copy Handler/Copy Handler.vcproj =================================================================== diff -u -r125baa60fb7ffbffa0a3b81802f1164f5123e919 -r009f23e5403b3c15bfceaab29e03f45ebdc50ab0 --- Copy Handler/Copy Handler.vcproj (.../Copy Handler.vcproj) (revision 125baa60fb7ffbffa0a3b81802f1164f5123e919) +++ Copy Handler/Copy Handler.vcproj (.../Copy Handler.vcproj) (revision 009f23e5403b3c15bfceaab29e03f45ebdc50ab0) @@ -42,7 +42,7 @@ Name="VCCustomBuildTool"/> - - @@ -1477,9 +1473,6 @@ RelativePath="..\modules\App Framework\LanguageDialog.h"> - - + + GetAppNameVer(), hIcon, 0); if (!bRes) { - GetLog()->Log(_T("[CMainWnd] ... creating tray icon failed.")); +// GetLog()->Log(_T("[CMainWnd] ... creating tray icon failed.")); return -1; } @@ -222,7 +222,7 @@ TRACE("Searching for files...\n"); // log - pTask->m_log.Log(IDS_OTFSEARCHINGFORFILES_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFSEARCHINGFORFILES_STRING)); // update status pTask->SetStatus(ST_SEARCHING, ST_STEP_MASK); @@ -247,13 +247,13 @@ if (!fi.Create(pTask->GetClipboardData(i)->GetPath(), i)) { // log - pTask->m_log.Log(IDS_OTFMISSINGCLIPBOARDINPUT_STRING, pTask->GetClipboardData(i)->GetPath()); + pTask->m_log.logw(GetResManager()->LoadString(IDS_OTFMISSINGCLIPBOARDINPUT_STRING), (PCTSTR)pTask->GetClipboardData(i)->GetPath()); continue; } else { // log - pTask->m_log.Log(IDS_OTFADDINGCLIPBOARDFILE_STRING, pTask->GetClipboardData(i)->GetPath()); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFADDINGCLIPBOARDFILE_STRING), (PCTSTR)pTask->GetClipboardData(i)->GetPath()); } // found file/folder - check if the dest name has been generated @@ -279,15 +279,15 @@ pTask->FilesAdd(fi); // log - pTask->m_log.Log(IDS_OTFADDEDFOLDER_STRING, fi.GetFullFilePath()); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFADDEDFOLDER_STRING), (PCTSTR)fi.GetFullFilePath()); } // don't add folder contents when moving inside one disk boundary if (bIgnoreDirs || !bMove || pTask->GetCopies() > 1 || iDestDrvNumber == -1 || iDestDrvNumber != fi.GetDriveNumber() || CFileInfo::Exist(fi.GetDestinationPath(pTask->GetDestPath().GetPath(), 0, ((int)bForceDirectories) << 1)) ) { // log - pTask->m_log.Log(IDS_OTFRECURSINGFOLDER_STRING, fi.GetFullFilePath()); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFRECURSINGFOLDER_STRING), (PCTSTR)fi.GetFullFilePath()); // no movefile possibility - use CustomCopyFile pTask->GetClipboardData(i)->SetMove(false); @@ -299,7 +299,7 @@ if (pTask->GetKillFlag()) { // log - pTask->m_log.Log(IDS_OTFADDINGKILLREQEST_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFADDINGKILLREQEST_STRING)); throw new CProcessingException(E_KILL_REQUEST, pTask); } } @@ -318,7 +318,7 @@ pTask->FilesAdd(fi); // file - add // log - pTask->m_log.Log(IDS_OTFADDEDFILE_STRING, fi.GetFullFilePath()); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFADDEDFILE_STRING), (PCTSTR)fi.GetFullFilePath()); } } @@ -339,14 +339,14 @@ pTask->Store(szPath, false); // log - pTask->m_log.Log(IDS_OTFSEARCHINGFINISHED_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFSEARCHINGFINISHED_STRING)); } // delete files - after copying void DeleteFiles(CTask* pTask) { // log - pTask->m_log.Log(IDS_OTFDELETINGFILES_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFDELETINGFILES_STRING)); // current processed path BOOL bSuccess; @@ -362,7 +362,7 @@ if (pTask->GetKillFlag()) { // log - pTask->m_log.Log(IDS_OTFDELETINGKILLREQUEST_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFDELETINGKILLREQUEST_STRING)); throw new CProcessingException(E_KILL_REQUEST, pTask); } @@ -389,7 +389,7 @@ if (!bSuccess && dwLastError != ERROR_PATH_NOT_FOUND && dwLastError != ERROR_FILE_NOT_FOUND) { // log - pTask->m_log.LogError(IDS_OTFDELETINGERROR_STRING, dwLastError, fi.GetFullFilePath()); + pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFDELETINGERROR_STRING), dwLastError, (PCTSTR)fi.GetFullFilePath()); throw new CProcessingException(E_ERROR, pTask, IDS_CPEDELETINGERROR_STRING, dwLastError, fi.GetFullFilePath()); } }//for @@ -401,7 +401,7 @@ pTask->IncreaseCurrentIndex(); // log - pTask->m_log.Log(IDS_OTFDELETINGFINISHED_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFDELETINGFINISHED_STRING)); } void CustomCopyFile(PCUSTOM_COPY_PARAMS pData) @@ -533,7 +533,7 @@ case IDCANCEL: // log if (GetConfig()->GetBoolValue(PP_CMCREATELOG)) - pData->pTask->m_log.Log(IDS_OTFPRECHECKCANCELREQUEST_STRING, pData->pfiSrcFile->GetFullFilePath()); + pData->pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFPRECHECKCANCELREQUEST_STRING), (PCTSTR)pData->pfiSrcFile->GetFullFilePath()); throw new CProcessingException(E_CANCEL, pData->pTask); break; case ID_RECOPYALL: @@ -568,7 +568,7 @@ if (uiNotificationType < 1) { // log - pData->pTask->m_log.LogError(IDS_OTFOPENINGERROR_STRING, dwLastError, pData->pfiSrcFile->GetFullFilePath()); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFOPENINGERROR_STRING), dwLastError, (PCTSTR)pData->pfiSrcFile->GetFullFilePath()); throw new CProcessingException(E_ERROR, pData->pTask, IDS_CPEOPENINGERROR_STRING, dwLastError, pData->pfiSrcFile->GetFullFilePath()); } else @@ -605,17 +605,17 @@ break; case IDCANCEL: // log - pData->pTask->m_log.LogError(IDS_OTFOPENINGCANCELREQUEST_STRING, dwLastError, pData->pfiSrcFile->GetFullFilePath()); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFOPENINGCANCELREQUEST_STRING), dwLastError, pData->pfiSrcFile->GetFullFilePath()); throw new CProcessingException(E_CANCEL, pData->pTask); break; case ID_WAIT: // log - pData->pTask->m_log.LogError(IDS_OTFOPENINGWAITREQUEST_STRING, dwLastError, pData->pfiSrcFile->GetFullFilePath()); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFOPENINGWAITREQUEST_STRING), dwLastError, pData->pfiSrcFile->GetFullFilePath()); throw new CProcessingException(E_ERROR, pData->pTask, IDS_CPEOPENINGERROR_STRING, dwLastError, pData->pfiSrcFile->GetFullFilePath()); break; case ID_RETRY: // log - pData->pTask->m_log.LogError(IDS_OTFOPENINGRETRY_STRING, dwLastError, pData->pfiSrcFile->GetFullFilePath()); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFOPENINGRETRY_STRING), dwLastError, pData->pfiSrcFile->GetFullFilePath()); goto l_openingsrc; break; } @@ -631,7 +631,7 @@ if (uiNotificationType < 1) { // log - pData->pTask->m_log.LogError(IDS_OTFDESTOPENINGERROR_STRING, dwLastError, pData->strDstFile); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFDESTOPENINGERROR_STRING), dwLastError, pData->strDstFile); throw new CProcessingException(E_ERROR, pData->pTask, IDS_CPEDESTOPENINGERROR_STRING, dwLastError, pData->strDstFile); } else @@ -659,12 +659,12 @@ SetFileAttributes(pData->strDstFile, FILE_ATTRIBUTE_NORMAL); // log - pData->pTask->m_log.LogError(IDS_OTFDESTOPENINGRETRY_STRING, dwLastError, pData->strDstFile); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFDESTOPENINGRETRY_STRING), dwLastError, pData->strDstFile); goto l_openingdst; break; case IDCANCEL: // log - pData->pTask->m_log.LogError(IDS_OTFDESTOPENINGCANCELREQUEST_STRING, dwLastError, pData->strDstFile); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFDESTOPENINGCANCELREQUEST_STRING), dwLastError, pData->strDstFile); throw new CProcessingException(E_CANCEL, pData->pTask); break; case ID_IGNOREALL: @@ -676,7 +676,7 @@ break; case ID_WAIT: // log - pData->pTask->m_log.LogError(IDS_OTFDESTOPENINGWAITREQUEST_STRING, dwLastError, pData->strDstFile); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFDESTOPENINGWAITREQUEST_STRING), dwLastError, pData->strDstFile); throw new CProcessingException(E_ERROR, pData->pTask, IDS_CPEDESTOPENINGERROR_STRING, dwLastError, pData->strDstFile); break; } @@ -696,14 +696,14 @@ if (SetFilePointer64(hSrc, ullMove, FILE_BEGIN) == -1 || SetFilePointer64(hDst, ullMove, FILE_BEGIN) == -1) { // log - pData->pTask->m_log.LogError(IDS_OTFMOVINGPOINTERSERROR_STRING, GetLastError(), pData->pfiSrcFile->GetFullFilePath(), pData->strDstFile, ullMove); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFMOVINGPOINTERSERROR_STRING), GetLastError(), pData->pfiSrcFile->GetFullFilePath(), pData->strDstFile, ullMove); // seek failed - seek to begin if (SetFilePointer64(hSrc, 0, FILE_BEGIN) == -1 || SetFilePointer64(hDst, 0, FILE_BEGIN) == -1) { // log dwLastError=GetLastError(); - pData->pTask->m_log.LogError(IDS_OTFRESTORINGPOINTERSERROR_STRING, dwLastError, pData->pfiSrcFile->GetFullFilePath(), pData->strDstFile); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFRESTORINGPOINTERSERROR_STRING), dwLastError, pData->pfiSrcFile->GetFullFilePath(), pData->strDstFile); throw new CProcessingException(E_ERROR, pData->pTask, IDS_CPERESTORINGPOINTERSERROR_STRING, dwLastError, pData->pfiSrcFile->GetFullFilePath(), pData->strDstFile); } else @@ -732,7 +732,7 @@ { // log dwLastError=GetLastError(); - pData->pTask->m_log.LogError(IDS_OTFSETTINGZEROSIZEERROR_STRING, dwLastError, pData->strDstFile); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFSETTINGZEROSIZEERROR_STRING), dwLastError, pData->strDstFile); throw new CProcessingException(E_ERROR, pData->pTask, IDS_CPESETTINGZEROSIZEERROR_STRING, dwLastError, pData->strDstFile); } @@ -745,7 +745,7 @@ if (pData->pTask->GetKillFlag()) { // log - pData->pTask->m_log.Log(IDS_OTFCOPYINGKILLREQUEST_STRING, pData->pfiSrcFile->GetFullFilePath(), pData->strDstFile); + pData->pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFCOPYINGKILLREQUEST_STRING), pData->pfiSrcFile->GetFullFilePath(), pData->strDstFile); throw new CProcessingException(E_KILL_REQUEST, pData->pTask); } @@ -755,7 +755,7 @@ // log const BUFFERSIZES *pbs1=pData->dbBuffer.GetSizes(), *pbs2=pData->pTask->GetBufferSizes(); - pData->pTask->m_log.Log(IDS_OTFCHANGINGBUFFERSIZE_STRING, + pData->pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFCHANGINGBUFFERSIZE_STRING), pbs1->m_uiDefaultSize, pbs1->m_uiOneDiskSize, pbs1->m_uiTwoDisksSize, pbs1->m_uiCDSize, pbs1->m_uiLANSize, pbs2->m_uiDefaultSize, pbs2->m_uiOneDiskSize, pbs2->m_uiTwoDisksSize, pbs2->m_uiCDSize, pbs2->m_uiLANSize, pData->pfiSrcFile->GetFullFilePath(), pData->strDstFile); @@ -771,7 +771,7 @@ { // log dwLastError=GetLastError(); - pData->pTask->m_log.LogError(IDS_OTFREADINGERROR_STRING, dwLastError, tord, pData->pfiSrcFile->GetFullFilePath()); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFREADINGERROR_STRING), dwLastError, tord, pData->pfiSrcFile->GetFullFilePath()); throw new CProcessingException(E_ERROR, pData->pTask, IDS_CPEREADINGERROR_STRING, dwLastError, tord, pData->pfiSrcFile->GetFullFilePath()); } @@ -795,7 +795,7 @@ { // log dwLastError=GetLastError(); - pData->pTask->m_log.LogError(IDS_OTFWRITINGERROR_STRING, dwLastError, rd, pData->strDstFile); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFWRITINGERROR_STRING), dwLastError, rd, pData->strDstFile); throw new CProcessingException(E_ERROR, pData->pTask, IDS_CPEWRITINGERROR_STRING, dwLastError, rd, pData->strDstFile); } @@ -820,7 +820,7 @@ catch(...) { // log - pData->pTask->m_log.LogError(IDS_OTFCAUGHTEXCEPTIONCCF_STRING, GetLastError()); + pData->pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFCAUGHTEXCEPTIONCCF_STRING), GetLastError()); // close handles if (hSrc != INVALID_HANDLE_VALUE) @@ -836,7 +836,7 @@ void ProcessFiles(CTask* pTask) { // log - pTask->m_log.Log(IDS_OTFPROCESSINGFILES_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFPROCESSINGFILES_STRING)); // count how much has been done (updates also a member in CTaskArray) pTask->CalcProcessedSize(); @@ -860,7 +860,7 @@ // log const BUFFERSIZES* pbs=ccp.dbBuffer.GetSizes(); - pTask->m_log.Log(IDS_OTFPROCESSINGFILESDATA_STRING, ccp.bOnlyCreate, + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFPROCESSINGFILESDATA_STRING), ccp.bOnlyCreate, pbs->m_uiDefaultSize, pbs->m_uiOneDiskSize, pbs->m_uiTwoDisksSize, pbs->m_uiCDSize, pbs->m_uiLANSize, nSize, iCopiesCount, bIgnoreFolders, dpDestPath.GetPath(), pTask->GetCurrentCopy(), pTask->GetCurrentIndex()); @@ -877,7 +877,7 @@ if (pTask->GetKillFlag()) { // log - pTask->m_log.Log(IDS_OTFPROCESSINGKILLREQUEST_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFPROCESSINGKILLREQUEST_STRING)); throw new CProcessingException(E_KILL_REQUEST, pTask); } @@ -892,7 +892,7 @@ { dwLastError=GetLastError(); //log - pTask->m_log.LogError(IDS_OTFMOVEFILEERROR_STRING, dwLastError, fi.GetFullFilePath(), ccp.strDstFile); + pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFMOVEFILEERROR_STRING), dwLastError, fi.GetFullFilePath(), ccp.strDstFile); throw new CProcessingException(E_ERROR, pTask, IDS_CPEMOVEFILEERROR_STRING, dwLastError, fi.GetFullFilePath(), ccp.strDstFile); } } @@ -904,7 +904,7 @@ if (!CreateDirectory(ccp.strDstFile, NULL) && (dwLastError=GetLastError()) != ERROR_ALREADY_EXISTS ) { // log - pTask->m_log.LogError(IDS_OTFCREATEDIRECTORYERROR_STRING, dwLastError, ccp.strDstFile); + pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFCREATEDIRECTORYERROR_STRING), dwLastError, ccp.strDstFile); throw new CProcessingException(E_ERROR, pTask, IDS_CPECREATEDIRECTORYERROR_STRING, dwLastError, ccp.strDstFile); } @@ -961,7 +961,7 @@ pTask->SetCurrentIndex(nSize); } // log - pTask->m_log.Log(IDS_OTFPROCESSINGFINISHED_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFPROCESSINGFINISHED_STRING)); } void CheckForWaitState(CTask* pTask) @@ -977,7 +977,7 @@ pTask->SetStatus(0, ST_WAITING); bContinue=true; - pTask->m_log.Log(IDS_OTFWAITINGFINISHED_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFWAITINGFINISHED_STRING)); // return; // skips sleep and kill flag checking } @@ -987,7 +987,7 @@ if (pTask->GetKillFlag()) { // log - pTask->m_log.Log(IDS_OTFWAITINGKILLREQUEST_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFWAITINGKILLREQUEST_STRING)); throw new CProcessingException(E_KILL_REQUEST, pTask); } } @@ -1001,14 +1001,14 @@ GetConfig()->GetStringValue(PP_PAUTOSAVEDIRECTORY, szPath, _MAX_PATH); GetApp()->ExpandPath(szPath); _tcscat(szPath, pTask->GetUniqueName()+_T(".log")); - pTask->m_log.Init(szPath, GetResManager(), GetConfig()->GetBoolValue(PP_CMCREATELOG)); + pTask->m_log.init(szPath, 262144, LT_DEBUG, false, false); // set thread boost HANDLE hThread=GetCurrentThread(); ::SetThreadPriorityBoost(hThread, GetConfig()->GetBoolValue(PP_CMDISABLEPRIORITYBOOST)); CTime tm=CTime::GetCurrentTime(); - pTask->m_log.Log(IDS_OTFTHREADSTART_STRING, tm.GetDay(), tm.GetMonth(), tm.GetYear(), tm.GetHour(), tm.GetMinute(), tm.GetSecond()); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFTHREADSTART_STRING), tm.GetDay(), tm.GetMonth(), tm.GetYear(), tm.GetHour(), tm.GetMinute(), tm.GetSecond()); try { @@ -1038,11 +1038,11 @@ // check for free space __int64 i64Needed, i64Available; l_showfeedback: - pTask->m_log.Log(IDS_OTFCHECKINGSPACE_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFCHECKINGSPACE_STRING)); if (!pTask->GetRequiredFreeSpace(&i64Needed, &i64Available)) { - pTask->m_log.Log(IDS_OTFNOTENOUGHFREESPACE_STRING, i64Needed, i64Available); + pTask->m_log.logw(GetResManager()->LoadString(IDS_OTFNOTENOUGHFREESPACE_STRING), i64Needed, i64Available); // default int iResult=ID_IGNORE; @@ -1069,16 +1069,16 @@ { case IDCANCEL: { - pTask->m_log.Log(IDS_OTFFREESPACECANCELREQUEST_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFFREESPACECANCELREQUEST_STRING)); throw new CProcessingException(E_CANCEL, pTask); break; } case ID_RETRY: - pTask->m_log.Log(IDS_OTFFREESPACERETRYING_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFFREESPACERETRYING_STRING)); goto l_showfeedback; break; case ID_IGNORE: - pTask->m_log.Log(IDS_OTFFREESPACEIGNORE_STRING); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFFREESPACEIGNORE_STRING)); break; } } @@ -1126,7 +1126,7 @@ } CTime tm=CTime::GetCurrentTime(); - pTask->m_log.Log(IDS_OTFTHREADFINISHED_STRING, tm.GetDay(), tm.GetMonth(), tm.GetYear(), tm.GetHour(), tm.GetMinute(), tm.GetSecond()); + pTask->m_log.logi(GetResManager()->LoadString(IDS_OTFTHREADFINISHED_STRING), tm.GetDay(), tm.GetMonth(), tm.GetYear(), tm.GetHour(), tm.GetMinute(), tm.GetSecond()); // we have been killed - the last operation InterlockedIncrement(pTask->m_plFinished); @@ -1142,7 +1142,7 @@ pTask->UpdateTime(); // log - pTask->m_log.LogError(IDS_OTFCAUGHTEXCEPTIONMAIN_STRING, e->m_dwError, e->m_iType); + pTask->m_log.logerr(GetResManager()->LoadString(IDS_OTFCAUGHTEXCEPTIONMAIN_STRING), e->m_dwError, e->m_iType); if (e->m_iType == E_ERROR && GetConfig()->GetBoolValue(PP_SNDPLAYSOUNDS)) { Index: Copy Handler/Structs.cpp =================================================================== diff -u -r7d997aef1e72f049ed1bc199e1b765d737d9963a -r009f23e5403b3c15bfceaab29e03f45ebdc50ab0 --- Copy Handler/Structs.cpp (.../Structs.cpp) (revision 7d997aef1e72f049ed1bc199e1b765d737d9963a) +++ Copy Handler/Structs.cpp (.../Structs.cpp) (revision 009f23e5403b3c15bfceaab29e03f45ebdc50ab0) @@ -112,7 +112,8 @@ //////////////////////////////////////////////////////////////////////////// // CTask members -CTask::CTask(const TASK_CREATE_DATA *pCreateData) +CTask::CTask(const TASK_CREATE_DATA *pCreateData) : + m_log(false) { m_nCurrentIndex=0; m_iLastProcessedIndex=-1; Index: Copy Handler/Structs.h =================================================================== diff -u -r3e1186252ab31f63d86d86c4b0ff593cfffbefde -r009f23e5403b3c15bfceaab29e03f45ebdc50ab0 --- Copy Handler/Structs.h (.../Structs.h) (revision 3e1186252ab31f63d86d86c4b0ff593cfffbefde) +++ Copy Handler/Structs.h (.../Structs.h) (revision 009f23e5403b3c15bfceaab29e03f45ebdc50ab0) @@ -23,7 +23,8 @@ #include "fileinfo.h" #include "DestPath.h" #include "DataBuffer.h" -#include "LogFile.h" +//#include "LogFile.h" +#include #define ST_NULL_STATUS 0x00000000 @@ -328,7 +329,8 @@ void SetContinueFlag(bool bFlag=true); bool GetContinueFlag(); - CLogFile m_log; +// CLogFile m_log; + icpf::log_file m_log; CCriticalSection m_cs; // protection for this class }; Fisheye: Tag 009f23e5403b3c15bfceaab29e03f45ebdc50ab0 refers to a dead (removed) revision in file `Copy Handler/resource.hm'. Fisheye: No comparison available. Pass `N' to diff?