&& !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);
}
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);
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.rVirtualFileSync, &QRadioButton::toggled, this, [this](bool checked) {
+ if (checked) {
+ _ui.lSelectiveSyncSizeLabel->clear();
+ _selectiveSyncBlacklist.clear();
+ }
+ });
connect(_ui.bSelectiveSync, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSelectiveSyncClicked);
QIcon appIcon = theme->applicationIcon();
_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()
OwncloudWizard::askExperimentalVirtualFilesFeature(this, [this](bool enable) {
if (!enable)
return;
-
- _ui.lSelectiveSyncSizeLabel->setText(QString());
- _selectiveSyncBlacklist.clear();
setRadioChecked(_ui.rVirtualFileSync);
});
}
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,