diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
commit | 669df123648aaa6aeccc70206b5417bc48b4e9ae (patch) | |
tree | 463c107a8d6405020bb304f7a7253e6b64afeee0 /lib/process_xml.cpp | |
parent | 5.18 (diff) | |
download | FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.gz FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.bz2 FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.zip |
5.19
Diffstat (limited to 'lib/process_xml.cpp')
-rw-r--r-- | lib/process_xml.cpp | 45 |
1 files changed, 9 insertions, 36 deletions
diff --git a/lib/process_xml.cpp b/lib/process_xml.cpp index 2422b2ef..49e4c711 100644 --- a/lib/process_xml.cpp +++ b/lib/process_xml.cpp @@ -99,6 +99,7 @@ void xmlAccess::OptionalDialogs::resetDialogs() warningDirectoryLockFailed = true; popupOnConfigChange = true; confirmSyncStart = true; + confirmExternalCommandMassInvoke = true; } @@ -157,36 +158,6 @@ xmlAccess::XmlBatchConfig xmlAccess::convertGuiToBatchPreservingExistingBatch(co } -xmlAccess::MergeType xmlAccess::getMergeType(const std::vector<Zstring>& filenames) //throw() -{ - bool guiCfgExists = false; - bool batchCfgExists = false; - - for (auto it = filenames.begin(); it != filenames.end(); ++it) - { - switch (xmlAccess::getXmlType(*it)) //throw() - { - case XML_TYPE_GUI: - guiCfgExists = true; - break; - - case XML_TYPE_BATCH: - batchCfgExists = true; - break; - - case XML_TYPE_GLOBAL: - case XML_TYPE_OTHER: - return MERGE_OTHER; - } - } - - if (guiCfgExists) - return batchCfgExists ? MERGE_GUI_BATCH : MERGE_GUI; - else - return batchCfgExists ? MERGE_BATCH : MERGE_OTHER; -} - - namespace { std::vector<Zstring> splitFilterByLines(const Zstring& filterPhrase) @@ -243,13 +214,13 @@ void writeText(const SyncDirection& value, std::string& output) { switch (value) { - case SYNC_DIR_LEFT: + case SyncDirection::LEFT: output = "left"; break; - case SYNC_DIR_RIGHT: + case SyncDirection::RIGHT: output = "right"; break; - case SYNC_DIR_NONE: + case SyncDirection::NONE: output = "none"; break; } @@ -261,11 +232,11 @@ bool readText(const std::string& input, SyncDirection& value) std::string tmp = input; zen::trim(tmp); if (tmp == "left") - value = SYNC_DIR_LEFT; + value = SyncDirection::LEFT; else if (tmp == "right") - value = SYNC_DIR_RIGHT; + value = SyncDirection::RIGHT; else if (tmp == "none") - value = SYNC_DIR_NONE; + value = SyncDirection::NONE; else return false; return true; @@ -1037,6 +1008,7 @@ void readConfig(const XmlIn& in, XmlGlobalSettings& config) inOpt["WarnDirectoryLockFailed" ].attribute("Enabled", config.optDialogs.warningDirectoryLockFailed); inOpt["ConfirmSaveConfig" ].attribute("Enabled", config.optDialogs.popupOnConfigChange); inOpt["ConfirmStartSync" ].attribute("Enabled", config.optDialogs.confirmSyncStart); + inOpt["ConfirmExternalCommandMassInvoke"].attribute("Enabled", config.optDialogs.confirmExternalCommandMassInvoke); //gui specific global settings (optional) XmlIn inGui = in["Gui"]; @@ -1415,6 +1387,7 @@ void writeConfig(const XmlGlobalSettings& config, XmlOut& out) outOpt["WarnDirectoryLockFailed" ].attribute("Enabled", config.optDialogs.warningDirectoryLockFailed); outOpt["ConfirmSaveConfig" ].attribute("Enabled", config.optDialogs.popupOnConfigChange); outOpt["ConfirmStartSync" ].attribute("Enabled", config.optDialogs.confirmSyncStart); + outOpt["ConfirmExternalCommandMassInvoke"].attribute("Enabled", config.optDialogs.confirmExternalCommandMassInvoke); //gui specific global settings (optional) XmlOut outGui = out["Gui"]; |