mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
Use csync as default
This commit is contained in:
parent
3ce5932bbd
commit
0aa5f51bb5
4 changed files with 19 additions and 19 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -83,9 +83,9 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="sshFolderRadioBtn">
|
||||
<widget class="QRadioButton" name="urlFolderRadioBtn">
|
||||
<property name="text">
|
||||
<string>Remote folder (SSH)</string>
|
||||
<string>Remote folder (URL)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -108,9 +108,9 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="sshFolderLineEdit">
|
||||
<widget class="QLineEdit" name="urlFolderLineEdit">
|
||||
<property name="placeholderText">
|
||||
<string>ssh://john@host.com//myfolder</string>
|
||||
<string>scp://john@host.com//myfolder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in a new issue