Skip to content

Commit

Permalink
Windows VFS: Enable Windows VFS by default
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOneRing committed Aug 18, 2020
1 parent 3cb570c commit b57266b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/8019
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Change: Enable Windows Virtual files by default

We now enable the Windows Virtual file support by default.

https://github.com/owncloud/client/pull/8019
2 changes: 1 addition & 1 deletion src/gui/accountsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
&& !folder->supportsVirtualFiles()
&& bestAvailableVfsMode() != Vfs::Off
&& !folder->isVfsOnOffSwitchPending()) {
ac = menu->addAction(tr("Enable virtual file support %1...").arg(bestAvailableVfsMode() == Vfs::WindowsCfApi ? tr("(tech preview)") : tr("(experimental)")));
ac = menu->addAction(tr("Enable virtual file support%1...").arg(bestAvailableVfsMode() == Vfs::WindowsCfApi ? QString() : tr(" (experimental)")));
connect(ac, &QAction::triggered, this, &AccountSettings::slotEnableVfsCurrentFolder);
}

Expand Down
3 changes: 1 addition & 2 deletions src/gui/folderwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,7 @@ FolderWizardSelectiveSync::FolderWizardSelectiveSync(const AccountPtr &account)
layout->addWidget(_selectiveSync);

if (Theme::instance()->showVirtualFilesOption() && bestAvailableVfsMode() != Vfs::Off) {
_virtualFilesCheckBox = new QCheckBox(tr("Use virtual files instead of downloading content immediately %1").arg(
bestAvailableVfsMode() == Vfs::WindowsCfApi ? tr("(tech preview)") : tr("(experimental)")));
_virtualFilesCheckBox = new QCheckBox(tr("Use virtual files instead of downloading content immediately%1").arg(bestAvailableVfsMode() == Vfs::WindowsCfApi ? QString() : tr(" (experimental)")));
connect(_virtualFilesCheckBox, &QCheckBox::clicked, this, &FolderWizardSelectiveSync::virtualFilesCheckboxClicked);
connect(_virtualFilesCheckBox, &QCheckBox::stateChanged, this, [this](int state) {
_selectiveSync->setEnabled(state == Qt::Unchecked);
Expand Down
19 changes: 14 additions & 5 deletions src/gui/wizard/owncloudadvancedsetuppage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage()

connect(_ui.rSyncEverything, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSyncEverythingClicked);
connect(_ui.rVirtualFileSync, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotVirtualFileSyncClicked);
connect(_ui.rVirtualFileSync, &QRadioButton::toggled, this, [this](bool checked) {
if (checked) {
_ui.lSelectiveSyncSizeLabel->clear();
_selectiveSyncBlacklist.clear();
}
});
connect(_ui.bSelectiveSync, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSelectiveSyncClicked);
connect(_ui.rManualFolder, &QAbstractButton::clicked, this, [this] { setRadioChecked(_ui.rManualFolder); });

Expand All @@ -82,8 +88,14 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage()
_ui.confTraillingSizeLabel->hide();
}

_ui.rVirtualFileSync->setText(tr("Use &virtual files instead of downloading content immediately %1").arg(
bestAvailableVfsMode() == Vfs::WindowsCfApi ? tr("(tech preview)") : tr("(experimental)")));
_ui.rVirtualFileSync->setText(tr("Use &virtual files instead of downloading content immediately").arg(bestAvailableVfsMode() == Vfs::WindowsCfApi ? QString() : tr(" (experimental)")));

#ifdef Q_OS_WIN
if (bestAvailableVfsMode() == Vfs::WindowsCfApi) {
qobject_cast<QVBoxLayout *>(_ui.wSyncStrategy->layout())->insertItem(0, _ui.lVirtualFileSync);
setRadioChecked(_ui.rVirtualFileSync);
}
#endif
}

void OwncloudAdvancedSetupPage::setupCustomization()
Expand Down Expand Up @@ -365,9 +377,6 @@ void OwncloudAdvancedSetupPage::slotVirtualFileSyncClicked()
OwncloudWizard::askExperimentalVirtualFilesFeature(this, [this](bool enable) {
if (!enable)
return;

_ui.lSelectiveSyncSizeLabel->setText(QString());
_selectiveSyncBlacklist.clear();
setRadioChecked(_ui.rVirtualFileSync);
});
}
Expand Down
16 changes: 2 additions & 14 deletions src/gui/wizard/owncloudwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,20 +246,8 @@ void OwncloudWizard::askExperimentalVirtualFilesFeature(QWidget *receiver, const
switch (bestVfsMode)
{
case Vfs::WindowsCfApi:
msgBox = new QMessageBox(
QMessageBox::Warning,
tr("Enable technical preview feature?"),
tr("When the \"virtual files\" mode is enabled no files will be downloaded initially. "
"Instead a virtual file will be created for each file that exists on the server. "
"When a file is opened its contents will be downloaded automatically. "
"Alternatively, files can be downloaded manually by using their context menu."
"\n\n"
"The virtual files mode is mutually exclusive with selective sync. "
"Currently unselected folders will be translated to online-only folders "
"and your selective sync settings will be reset."), QMessageBox::NoButton, receiver);
acceptButton = msgBox->addButton(tr("Enable virtual files"), QMessageBox::AcceptRole);
msgBox->addButton(tr("Continue to use selective sync"), QMessageBox::RejectRole);
break;
callback(true);
return;
case Vfs::WithSuffix:
msgBox = new QMessageBox(
QMessageBox::Warning,
Expand Down

0 comments on commit b57266b

Please sign in to comment.