virtual void unregisterFolder() = 0;
+ /** Whether the socket api should show pin state options
+ *
+ * Some plugins might provide alternate shell integration, making the normal
+ * context menu actions redundant.
+ */
+ virtual bool socketApiPinStateActionsShown() const = 0;
+
/** Return true when download of a file's data is currently ongoing.
*
* See also the beginHydrating() and doneHydrating() signals.
void stop() override {}
void unregisterFolder() override {}
+ bool socketApiPinStateActionsShown() const override { return false; }
bool isHydrating() const override { return false; }
bool updateMetadata(const QString &, time_t, quint64, const QByteArray &, QString *) override { return true; }
}
// File availability actions
- if (syncFolder && syncFolder->supportsVirtualFiles()) {
+ if (syncFolder
+ && syncFolder->supportsVirtualFiles()
+ && syncFolder->vfs().socketApiPinStateActionsShown()) {
bool hasAlwaysLocal = false;
bool hasOnlineOnly = false;
bool hasHydratedOnlineOnly = false;
void stop() override;
void unregisterFolder() override;
+ bool socketApiPinStateActionsShown() const override { return true; }
bool isHydrating() const override;
bool updateMetadata(const QString &filePath, time_t modtime, quint64 size, const QByteArray &fileId, QString *error) override;