From 2cbcd52f35973edc66f40336b3349e49fa15fc01 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Mon, 22 Oct 2012 11:31:42 +0200 Subject: [PATCH] Do not allow the selection of a target in single folder mode --- src/mirall/application.cpp | 5 +++-- src/mirall/folderwizard.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mirall/application.cpp b/src/mirall/application.cpp index b7d59bc535..940f1d6f85 100644 --- a/src/mirall/application.cpp +++ b/src/mirall/application.cpp @@ -575,10 +575,11 @@ void Application::slotAddFolder() targetPath = _folderWizard->field(QLatin1String("targetURLFolder")).toString(); onlyOnline = _folderWizard->field(QLatin1String("onlyOnline?")).toBool(); onlyThisLAN = _folderWizard->field(QLatin1String("onlyThisLAN?")).toBool(); - } else if( _folderWizard->field(QLatin1String("OC?")).toBool()) { + } else if( _folderWizard->field(QLatin1String("OC?")).toBool() || + Theme::instance()->singleSyncFolder()) { // setup a ownCloud folder backend = QLatin1String("owncloud"); - targetPath = _folderWizard->field(QLatin1String("targetOCFolder")).toString(); + targetPath = _folderWizard->field(QLatin1String("targetOCFolder")).toString(); //empty in single folder mode } else { qWarning() << "* Folder not local and note remote?"; goodData = false; diff --git a/src/mirall/folderwizard.cpp b/src/mirall/folderwizard.cpp index 650f512a40..cd4483e8aa 100644 --- a/src/mirall/folderwizard.cpp +++ b/src/mirall/folderwizard.cpp @@ -459,7 +459,8 @@ FolderWizard::FolderWizard( QWidget *parent ) { _folderWizardSourcePage = new FolderWizardSourcePage(); setPage(Page_Source, _folderWizardSourcePage ); - setPage(Page_Target, new FolderWizardTargetPage()); + if (!Theme::instance()->singleSyncFolder()) + setPage(Page_Target, new FolderWizardTargetPage()); // setPage(Page_Network, new FolderWizardNetworkPage()); // setPage(Page_Owncloud, new FolderWizardOwncloudPage()); setWindowTitle( tr( "%1 Folder Wizard" ).arg( Theme::instance()->appName() ) );