diff options
author | Christian Kamm <mail@ckamm.de> | 2018-11-26 13:33:29 +0300 |
---|---|---|
committer | Christian Kamm <mail@ckamm.de> | 2018-11-26 15:02:48 +0300 |
commit | 18ab3f5dcd37bba296c2b650826b8e3454fc66b3 (patch) | |
tree | 286c5eb99731328d25473a3548b5d236f28ae488 /src/gui/folder.h | |
parent | 3ba01233535623e7638bb1fff0c478e483cca8cd (diff) |
vfs: Separate vfs availability from new-files-virtual
This helps support 2.5 settings where there are virtual files in the
tree but new files aren't created virtual.
It's also a prelude for #6815
There's currently no way of
- upgrading vfs plugins (a silent suffix->winvfs upgrade is attempted
once only, when moving to master)
- disabling vfs capabilities outright
Diffstat (limited to 'src/gui/folder.h')
-rw-r--r-- | src/gui/folder.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/gui/folder.h b/src/gui/folder.h index 555fdb29f..e69cadcdd 100644 --- a/src/gui/folder.h +++ b/src/gui/folder.h @@ -69,11 +69,12 @@ public: bool ignoreHiddenFiles; /// Which virtual files setting the folder uses Vfs::Mode virtualFilesMode = Vfs::Off; + /// Whether new files are virtual + bool newFilesAreVirtual = false; /// The CLSID where this folder appears in registry for the Explorer navigation pane entry. QUuid navigationPaneClsid; - /// Whether this suffix-vfs should be migrated to a better - /// vfs plugin if possible + /// Whether the vfs mode shall silently be updated if possible bool upgradeVfsMode = false; /// Saves the folder definition, creating a new settings group. @@ -255,9 +256,18 @@ public: */ void registerFolderWatcher(); - /** virtual files of some kind are enabled */ - bool useVirtualFiles() const; - void setUseVirtualFiles(bool enabled); + /** virtual files of some kind are enabled + * + * This is independent of whether new files will be virtual. It's possible to have this enabled + * and never have an automatic virtual file. But when it's on, the shell context menu will allow + * users to make existing files virtual. + */ + bool supportsVirtualFiles() const; + void setSupportsVirtualFiles(bool enabled); + + /** whether new remote files shall become virtual locally */ + bool newFilesAreVirtual() const; + void setNewFilesAreVirtual(bool enabled); signals: void syncStateChange(); |