Skip to content

Commit 97cfbea

Browse files
authored
Merge pull request nextcloud#10209 from nextcloud/backport/10205/stable-34.0
[stable-34.0] Relabel "virtual files" as "File Provider"
2 parents 10395f9 + 78ec14b commit 97cfbea

7 files changed

Lines changed: 18 additions & 7 deletions

src/gui/accountsettings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,7 +1898,7 @@ QAction *AccountSettings::addActionToEncryptionMessage(const QString &actionTitl
18981898
void AccountSettings::setupE2eEncryptionMessage()
18991899
{
19001900
#ifdef BUILD_FILE_PROVIDER_MODULE
1901-
const auto encryptionMessage = tr("This account supports end-to-end encryption, but it needs to be set up first.") + QStringLiteral(" ") + tr("The virtual files integration does not support end-to-end encryption yet.");
1901+
const auto encryptionMessage = tr("This account supports end-to-end encryption, but it needs to be set up first.") + QStringLiteral(" ") + tr("The File Provider extension does not support end-to-end encryption yet.");
19021902
#else
19031903
const auto encryptionMessage = tr("This account supports end-to-end encryption, but it needs to be set up first.");
19041904
#endif

src/gui/accountsettings.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
</font>
157157
</property>
158158
<property name="text">
159-
<string>Virtual files</string>
159+
<string>File Provider</string>
160160
</property>
161161
</widget>
162162
</item>

src/gui/macOS/fileprovidersettingscontroller_mac.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ void disableFileProviderForAllEnabledAccountsOnUnsupportedOS()
400400

401401
if (setEnabled && showInformationDialog) {
402402
QMessageBox::information(nullptr,
403-
controller->tr("Virtual files enabled"),
404-
controller->tr("Virtual files have been enabled for this account.\n\n"
403+
controller->tr("File Provider enabled"),
404+
controller->tr("File Provider has been enabled for this account.\n\n"
405405
"Your files are now accessible in Finder under the \"Locations\" section."));
406406
}
407407
}

src/gui/macOS/ui/FileProviderSettings.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Page {
2020
property var controller: FileProviderSettingsController
2121
property string accountUserIdAtHost: ""
2222

23-
title: qsTr("Virtual files settings")
23+
title: qsTr("File provider settings")
2424

2525
background: Rectangle {
2626
color: palette.light
@@ -54,7 +54,7 @@ Page {
5454
Layout.preferredWidth: Math.max(0, virtualFilesLayout.width - vfsEnabledCheckBox.width - virtualFilesLayout.spacing)
5555
horizontalAlignment: Text.AlignLeft
5656
wrapMode: Text.WordWrap
57-
text: qsTr("Virtual files appear like regular files, but they do not use local storage space. The content downloads automatically when you open the file. Virtual files and classic sync can not be used at the same time.")
57+
text: qsTr("File Provider items appear like regular files, but they do not use local storage space. The content downloads automatically when you open the file. It is not possible to have a File Provider and classic sync Finder integration enabled simultaneously.")
5858
}
5959
Switch {
6060
id: vfsEnabledCheckBox

src/gui/wizard/accountwizardcontroller.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,15 @@ bool AccountWizardController::canUseVirtualFiles() const
306306
#endif
307307
}
308308

309+
bool AccountWizardController::isUsingFileProvider() const
310+
{
311+
#ifdef BUILD_FILE_PROVIDER_MODULE
312+
return Mac::FileProvider::available();
313+
#else
314+
return false;
315+
#endif
316+
}
317+
309318
bool AccountWizardController::canUseClassicSync() const
310319
{
311320
return !Theme::instance()->enforceVirtualFilesSyncFolder() || !canUseVirtualFiles();

src/gui/wizard/accountwizardcontroller.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class AccountWizardController : public QObject
6161
Q_PROPERTY(SyncMode syncMode READ syncMode NOTIFY syncModeChanged)
6262
Q_PROPERTY(bool canFinish READ canFinish NOTIFY canFinishChanged)
6363
Q_PROPERTY(bool canUseVirtualFiles READ canUseVirtualFiles CONSTANT)
64+
Q_PROPERTY(bool isUsingFileProvider READ isUsingFileProvider CONSTANT)
6465
Q_PROPERTY(bool canUseClassicSync READ canUseClassicSync CONSTANT)
6566
Q_PROPERTY(bool needsSyncOptions READ needsSyncOptions NOTIFY needsSyncOptionsChanged)
6667
Q_PROPERTY(bool canSkipFolderConfiguration READ canSkipFolderConfiguration CONSTANT)
@@ -137,6 +138,7 @@ class AccountWizardController : public QObject
137138
[[nodiscard]] SyncMode syncMode() const;
138139
[[nodiscard]] bool canFinish() const;
139140
[[nodiscard]] bool canUseVirtualFiles() const;
141+
[[nodiscard]] bool isUsingFileProvider() const;
140142
[[nodiscard]] bool canUseClassicSync() const;
141143
[[nodiscard]] bool needsSyncOptions() const;
142144
[[nodiscard]] bool canSkipFolderConfiguration() const;

src/gui/wizard/qml/SyncOptionsPage.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Item {
8787
OptionRow {
8888
Layout.fillWidth: true
8989
visible: root.controller.canUseVirtualFiles
90-
title: qsTr("Virtual files")
90+
title: root.controller.isUsingFileProvider ? qsTr("File Provider") : qsTr("Virtual files")
9191
description: qsTr("Download files on-demand")
9292
selected: root.controller.syncMode === AccountWizardController.VirtualFiles
9393
onClicked: root.controller.setSyncMode(AccountWizardController.VirtualFiles)

0 commit comments

Comments
 (0)