Skip to content

Commit

Permalink
Advances Wizard: Move choose what to sync to Sync everything
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOneRing committed Aug 17, 2020
1 parent e8fc416 commit 499b95f
Show file tree
Hide file tree
Showing 2 changed files with 219 additions and 337 deletions.
10 changes: 3 additions & 7 deletions src/gui/wizard/owncloudadvancedsetuppage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage()
setButtonText(QWizard::NextButton, tr("Connect..."));

connect(_ui.rSyncEverything, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSyncEverythingClicked);
connect(_ui.rSelectiveSync, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSelectiveSyncClicked);
connect(_ui.rVirtualFileSync, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotVirtualFileSyncClicked);
connect(_ui.bSelectiveSync, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSelectiveSyncClicked);
connect(_ui.rManualFolder, &QAbstractButton::clicked, this, [this] { setRadioChecked(_ui.rManualFolder); });

connect(_ui.rSyncEverything, &QRadioButton::toggled, _ui.syncEverythingWidget, &QWidget::setEnabled);
connect(_ui.rManualFolder, &QRadioButton::toggled, _ui.whereToSyncWidget, &QWidget::setDisabled);

QIcon appIcon = theme->applicationIcon();
_ui.lServerIcon->setText(QString());
_ui.lServerIcon->setPixmap(appIcon.pixmap(48));
Expand Down Expand Up @@ -146,7 +148,6 @@ void OwncloudAdvancedSetupPage::initializePage()

if (Theme::instance()->wizardSelectiveSyncDefaultNothing()) {
_selectiveSyncBlacklist = QStringList("/");
setRadioChecked(_ui.rSelectiveSync);
QTimer::singleShot(0, this, &OwncloudAdvancedSetupPage::slotSelectiveSyncClicked);
}

Expand Down Expand Up @@ -344,9 +345,6 @@ void OwncloudAdvancedSetupPage::slotSelectiveSyncClicked()

if (updateBlacklist) {
if (!_selectiveSyncBlacklist.isEmpty()) {
_ui.rSelectiveSync->blockSignals(true);
setRadioChecked(_ui.rSelectiveSync);
_ui.rSelectiveSync->blockSignals(false);
auto s = dlg->estimatedSize();
if (s > 0) {
_ui.lSelectiveSyncSizeLabel->setText(tr("(%1)").arg(Utility::octetsToString(s)));
Expand Down Expand Up @@ -395,8 +393,6 @@ void OwncloudAdvancedSetupPage::setRadioChecked(QRadioButton *radio)
radio->setCheckable(true);
radio->setChecked(true);

if (radio != _ui.rSelectiveSync)
_ui.rSelectiveSync->setCheckable(false);
if (radio != _ui.rVirtualFileSync)
_ui.rVirtualFileSync->setCheckable(false);

Expand Down
Loading

0 comments on commit 499b95f

Please sign in to comment.