Index: src/ch/TShellExtensionConfig.cpp =================================================================== diff -u -N -r306fbe693c70290af9de9a5779084a697de22d75 -r0d5b67ee96b435d63f7bf075dc8e28603793b187 --- src/ch/TShellExtensionConfig.cpp (.../TShellExtensionConfig.cpp) (revision 306fbe693c70290af9de9a5779084a697de22d75) +++ src/ch/TShellExtensionConfig.cpp (.../TShellExtensionConfig.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) @@ -23,6 +23,7 @@ #include "CfgProperties.h" #include "resource.h" #include "shortcuts.h" +#include "../libchengine/TConfigSerializers.h" TShellExtensionConfig::TShellExtensionConfig(const logger::TLogFileDataPtr& spLogData) : m_spLog(logger::MakeLogger(spLogData, L"ShellExtConfig")) @@ -33,7 +34,7 @@ { try { - chcore::TConfig& rConfig = GetConfig(); + chengine::TConfig& rConfig = GetConfig(); TShellExtMenuConfig cfgShellExt; @@ -57,8 +58,8 @@ PrepareDragAndDropMenuItems(cfgShellExt); PrepareNormalMenuItems(cfgShellExt); - chcore::TConfig cfgStorage; - chcore::TString wstrData; + chengine::TConfig cfgStorage; + string::TString wstrData; cfgShellExt.StoreInConfig(cfgStorage, _T("ShellExtCfg")); cfgStorage.WriteToString(wstrData); @@ -75,33 +76,33 @@ void TShellExtensionConfig::PrepareDragAndDropMenuItems(TShellExtMenuConfig &cfgShellExt) const { - chcore::TConfig& rConfig = GetConfig(); + chengine::TConfig& rConfig = GetConfig(); ictranslate::CResourceManager& rResManager = GetResManager(); TShellMenuItemPtr spDragAndDropRootItem = cfgShellExt.GetDragAndDropRoot(); bool bAddedAnyOption = false; if(GetPropValue(rConfig)) { spDragAndDropRootItem->AddChild(std::make_shared(rResManager.LoadString(IDS_MENUCOPY_STRING), rResManager.LoadString(IDS_MENUTIPCOPY_STRING), - TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy), + TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chengine::eOperation_Copy), TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeIDataObject), - TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializePidlFolder, chcore::TSmartPath()), false, chcore::eOperation_Copy)); + TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializePidlFolder, chcore::TSmartPath()), false, chengine::eOperation_Copy)); bAddedAnyOption = true; } if(GetPropValue(rConfig)) { spDragAndDropRootItem->AddChild(std::make_shared(rResManager.LoadString(IDS_MENUMOVE_STRING), rResManager.LoadString(IDS_MENUTIPMOVE_STRING), - TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Move), + TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chengine::eOperation_Move), TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeIDataObject), - TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializePidlFolder, chcore::TSmartPath()), false, chcore::eOperation_Move)); + TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializePidlFolder, chcore::TSmartPath()), false, chengine::eOperation_Move)); bAddedAnyOption = true; } if(GetPropValue(rConfig)) { spDragAndDropRootItem->AddChild(std::make_shared(rResManager.LoadString(IDS_MENUCOPYMOVESPECIAL_STRING), rResManager.LoadString(IDS_MENUTIPCOPYMOVESPECIAL_STRING), - TOperationTypeInfo(TOperationTypeInfo::eOpType_Autodetect, chcore::eOperation_Copy), + TOperationTypeInfo(TOperationTypeInfo::eOpType_Autodetect, chengine::eOperation_Copy), TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeIDataObject), TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializePidlFolder, chcore::TSmartPath()), true)); bAddedAnyOption = true; @@ -116,23 +117,23 @@ void TShellExtensionConfig::PrepareNormalMenuItems(TShellExtMenuConfig &cfgShellExt) const { - chcore::TConfig& rConfig = GetConfig(); + chengine::TConfig& rConfig = GetConfig(); ictranslate::CResourceManager& rResManager = GetResManager(); TShellMenuItemPtr spNormalRootItem = cfgShellExt.GetNormalRoot(); if(GetPropValue(rConfig)) { spNormalRootItem->AddChild(std::make_shared(rResManager.LoadString(IDS_MENUPASTE_STRING), rResManager.LoadString(IDS_MENUTIPPASTE_STRING), - TOperationTypeInfo(TOperationTypeInfo::eOpType_Autodetect, chcore::eOperation_Copy), + TOperationTypeInfo(TOperationTypeInfo::eOpType_Autodetect, chengine::eOperation_Copy), TSourcePathsInfo(TSourcePathsInfo::eSrcType_Clipboard), TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializeAuto, chcore::TSmartPath()), false)); } if(GetPropValue(rConfig)) { spNormalRootItem->AddChild(std::make_shared(rResManager.LoadString(IDS_MENUPASTESPECIAL_STRING), rResManager.LoadString(IDS_MENUTIPPASTESPECIAL_STRING), - TOperationTypeInfo(TOperationTypeInfo::eOpType_Autodetect, chcore::eOperation_Copy), + TOperationTypeInfo(TOperationTypeInfo::eOpType_Autodetect, chengine::eOperation_Copy), TSourcePathsInfo(TSourcePathsInfo::eSrcType_Clipboard), TDestinationPathInfo(TDestinationPathInfo::eDstType_InitializeAuto, chcore::TSmartPath()), true)); } @@ -160,7 +161,7 @@ for(const CShortcut& tShortcut : vShortcuts) { menuItem->AddChild(std::make_shared((PCTSTR)tShortcut.m_strName, (PCTSTR)tShortcut.m_strPath, - TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy), + TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chengine::eOperation_Copy), TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto), TDestinationPathInfo(TDestinationPathInfo::eDstType_Specified, chcore::PathFromString((PCTSTR)tShortcut.m_strPath)), false)); } @@ -173,7 +174,7 @@ // "Choose" menu option menuItem->AddChild(std::make_shared(rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_STRING), rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_TOOLTIP_STRING), - TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy), + TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chengine::eOperation_Copy), TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto), TDestinationPathInfo(TDestinationPathInfo::eDstType_Choose, chcore::TSmartPath()), false)); } @@ -184,7 +185,7 @@ for(const CShortcut& tShortcut : vShortcuts) { menuItem->AddChild(std::make_shared((PCTSTR)tShortcut.m_strName, (PCTSTR)tShortcut.m_strPath, - TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Move), + TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chengine::eOperation_Move), TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto), TDestinationPathInfo(TDestinationPathInfo::eDstType_Specified, chcore::PathFromString((PCTSTR)tShortcut.m_strPath)), false)); } @@ -197,7 +198,7 @@ // "Choose" menu option menuItem->AddChild(std::make_shared(rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_STRING), rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_TOOLTIP_STRING), - TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Move), + TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chengine::eOperation_Move), TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto), TDestinationPathInfo(TDestinationPathInfo::eDstType_Choose, chcore::TSmartPath()), false)); } @@ -208,7 +209,7 @@ for(const CShortcut& tShortcut : vShortcuts) { menuItem->AddChild(std::make_shared((PCTSTR)tShortcut.m_strName, (PCTSTR)tShortcut.m_strPath, - TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy), + TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chengine::eOperation_Copy), TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto), TDestinationPathInfo(TDestinationPathInfo::eDstType_Specified, chcore::PathFromString((PCTSTR)tShortcut.m_strPath)), true)); } @@ -221,7 +222,7 @@ // "Choose" menu option menuItem->AddChild(std::make_shared(rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_STRING), rResManager.LoadString(IDS_SHELLEXT_CHOOSE_DIR_TOOLTIP_STRING), - TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chcore::eOperation_Copy), + TOperationTypeInfo(TOperationTypeInfo::eOpType_Specified, chengine::eOperation_Copy), TSourcePathsInfo(TSourcePathsInfo::eSrcType_InitializeAuto), TDestinationPathInfo(TDestinationPathInfo::eDstType_Choose, chcore::TSmartPath()), true)); }