From b9203ee84953006547f4afd58f405874c87bf0dc Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:02:17 +0200 Subject: 3.1 --- structures.cpp | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'structures.cpp') diff --git a/structures.cpp b/structures.cpp index 31c66650..a9d386f5 100644 --- a/structures.cpp +++ b/structures.cpp @@ -123,17 +123,10 @@ void SyncConfiguration::setVariant(const Variant var) } } -wxString MainConfiguration::getSyncVariantName() -{ - const SyncConfiguration::Variant mainVariant = syncConfiguration.getVariant(); - - //test if there's a deviating variant within the additional folder pairs - for (std::vector::const_iterator i = additionalPairs.begin(); i != additionalPairs.end(); ++i) - if (i->altSyncConfig.get() && i->altSyncConfig->syncConfiguration.getVariant() != mainVariant) - return _("Multiple..."); - //seems to be all in sync... - switch (mainVariant) +wxString SyncConfiguration::getVariantName() const +{ + switch (getVariant()) { case SyncConfiguration::AUTOMATIC: return _(""); @@ -146,11 +139,24 @@ wxString MainConfiguration::getSyncVariantName() case SyncConfiguration::CUSTOM: return _("Custom"); } - return _("Error"); } +wxString MainConfiguration::getSyncVariantName() +{ + const SyncConfiguration::Variant mainVariant = syncConfiguration.getVariant(); + + //test if there's a deviating variant within the additional folder pairs + for (std::vector::const_iterator i = additionalPairs.begin(); i != additionalPairs.end(); ++i) + if (i->altSyncConfig.get() && i->altSyncConfig->syncConfiguration.getVariant() != mainVariant) + return _("Multiple..."); + + //seems to be all in sync... + return syncConfiguration.getVariantName(); +} + + wxString FreeFileSync::getDescription(CompareFilesResult cmpRes) { switch (cmpRes) -- cgit