diff --git a/src/mirall/application.cpp b/src/mirall/application.cpp index 49b49a2ba..fc48bea59 100644 --- a/src/mirall/application.cpp +++ b/src/mirall/application.cpp @@ -128,14 +128,14 @@ void Application::slotAddFolder() QString alias = _folderWizard->field("alias").toString(); QSettings settings(folderConfigPath() + "/" + alias, QSettings::IniFormat); - settings.setValue("folder/backend", "unison"); + settings.setValue("folder/backend", "csync"); settings.setValue("folder/path", _folderWizard->field("sourceFolder")); if (_folderWizard->field("local?").toBool()) { - settings.setValue("backend:unison/secondPath", _folderWizard->field("targetLocalFolder")); + settings.setValue("backend:csync/secondPath", _folderWizard->field("targetLocalFolder")); } else if (_folderWizard->field("remote?").toBool()) { - settings.setValue("backend:unison/secondPath", _folderWizard->field("targetSSHFolder")); + settings.setValue("backend:csync/secondPath", _folderWizard->field("targetURLFolder")); bool onlyOnline = _folderWizard->field("onlyOnline?").toBool(); settings.setValue("folder/onlyOnline", onlyOnline); diff --git a/src/mirall/folderwizard.cpp b/src/mirall/folderwizard.cpp index 196b17c7d..334d16e75 100644 --- a/src/mirall/folderwizard.cpp +++ b/src/mirall/folderwizard.cpp @@ -61,10 +61,10 @@ FolderWizardTargetPage::FolderWizardTargetPage() _ui.setupUi(this); registerField("local?", _ui.localFolderRadioBtn); - registerField("remote?", _ui.sshFolderRadioBtn); + registerField("remote?", _ui.urlFolderRadioBtn); registerField("targetLocalFolder", _ui.localFolder2LineEdit); - registerField("targetSSHFolder", _ui.sshFolderLineEdit); + registerField("targetURLFolder", _ui.urlFolderLineEdit); registerField("onlyOnline?", _ui.checkBoxOnlyOnline); registerField("onlyThisLAN?", _ui.checkBoxOnlyThisLAN); @@ -79,9 +79,9 @@ bool FolderWizardTargetPage::isComplete() const if (_ui.localFolderRadioBtn->isChecked()) { return QFileInfo(_ui.localFolder2LineEdit->text()).isDir(); } - else if (_ui.sshFolderRadioBtn->isChecked()) { - QUrl url(_ui.sshFolderLineEdit->text()); - return url.isValid() && url.scheme() == "ssh"; + else if (_ui.urlFolderRadioBtn->isChecked()) { + QUrl url(_ui.urlFolderLineEdit->text()); + return url.isValid() && (url.scheme() == "scp" || url.scheme() == "smb"); } return false; } @@ -97,7 +97,7 @@ void FolderWizardTargetPage::on_localFolderRadioBtn_toggled() emit completeChanged(); } -void FolderWizardTargetPage::on_sshFolderRadioBtn_toggled() +void FolderWizardTargetPage::on_urlFolderRadioBtn_toggled() { slotToggleItems(); emit completeChanged(); @@ -114,7 +114,7 @@ void FolderWizardTargetPage::on_localFolder2LineEdit_textChanged() emit completeChanged(); } -void FolderWizardTargetPage::on_sshFolderLineEdit_textChanged() +void FolderWizardTargetPage::on_urlFolderLineEdit_textChanged() { emit completeChanged(); } @@ -125,8 +125,8 @@ void FolderWizardTargetPage::slotToggleItems() _ui.localFolder2LineEdit->setEnabled(enabled); _ui.localFolder2ChooseBtn->setEnabled(enabled); - enabled = _ui.sshFolderRadioBtn->isChecked(); - _ui.sshFolderLineEdit->setEnabled(enabled); + enabled = _ui.urlFolderRadioBtn->isChecked(); + _ui.urlFolderLineEdit->setEnabled(enabled); _ui.checkBoxOnlyOnline->setEnabled(enabled); _ui.checkBoxOnlyThisLAN->setEnabled(enabled); diff --git a/src/mirall/folderwizard.h b/src/mirall/folderwizard.h index 8dd5bcc88..7734d5d48 100644 --- a/src/mirall/folderwizard.h +++ b/src/mirall/folderwizard.h @@ -62,11 +62,11 @@ protected slots: void on_localFolder2ChooseBtn_clicked(); void on_localFolderRadioBtn_toggled(); - void on_sshFolderRadioBtn_toggled(); + void on_urlFolderRadioBtn_toggled(); void on_checkBoxOnlyOnline_toggled(); void on_localFolder2LineEdit_textChanged(); - void on_sshFolderLineEdit_textChanged(); + void on_urlFolderLineEdit_textChanged(); private: Ui_FolderWizardTargetPage _ui; @@ -81,7 +81,7 @@ private: * local? * remote? * targetLocalFolder - * targetSSHFolder + * targetURLFolder * */ class FolderWizard : public QWizard diff --git a/src/mirall/folderwizardtargetpage.ui b/src/mirall/folderwizardtargetpage.ui index 572385568..8faf3e4cd 100644 --- a/src/mirall/folderwizardtargetpage.ui +++ b/src/mirall/folderwizardtargetpage.ui @@ -83,9 +83,9 @@ - + - Remote folder (SSH) + Remote folder (URL) @@ -108,9 +108,9 @@ - + - ssh://john@host.com//myfolder + scp://john@host.com//myfolder