mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 06:45:49 +03:00
Vfs: Add option to hide socketapi pin actions
Because some plugins provide alternative ui.
This commit is contained in:
parent
e6ee5d0f8a
commit
e9cbe13598
3 changed files with 12 additions and 1 deletions
|
@ -127,6 +127,13 @@ public:
|
||||||
virtual void unregisterFolder() = 0;
|
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.
|
/** Return true when download of a file's data is currently ongoing.
|
||||||
*
|
*
|
||||||
* See also the beginHydrating() and doneHydrating() signals.
|
* See also the beginHydrating() and doneHydrating() signals.
|
||||||
|
@ -251,6 +258,7 @@ public:
|
||||||
void stop() override {}
|
void stop() override {}
|
||||||
void unregisterFolder() override {}
|
void unregisterFolder() override {}
|
||||||
|
|
||||||
|
bool socketApiPinStateActionsShown() const override { return false; }
|
||||||
bool isHydrating() const override { return false; }
|
bool isHydrating() const override { return false; }
|
||||||
|
|
||||||
bool updateMetadata(const QString &, time_t, quint64, const QByteArray &, QString *) override { return true; }
|
bool updateMetadata(const QString &, time_t, quint64, const QByteArray &, QString *) override { return true; }
|
||||||
|
|
|
@ -1011,7 +1011,9 @@ void SocketApi::command_GET_MENU_ITEMS(const QString &argument, OCC::SocketListe
|
||||||
}
|
}
|
||||||
|
|
||||||
// File availability actions
|
// File availability actions
|
||||||
if (syncFolder && syncFolder->supportsVirtualFiles()) {
|
if (syncFolder
|
||||||
|
&& syncFolder->supportsVirtualFiles()
|
||||||
|
&& syncFolder->vfs().socketApiPinStateActionsShown()) {
|
||||||
bool hasAlwaysLocal = false;
|
bool hasAlwaysLocal = false;
|
||||||
bool hasOnlineOnly = false;
|
bool hasOnlineOnly = false;
|
||||||
bool hasHydratedOnlineOnly = false;
|
bool hasHydratedOnlineOnly = false;
|
||||||
|
|
|
@ -35,6 +35,7 @@ public:
|
||||||
void stop() override;
|
void stop() override;
|
||||||
void unregisterFolder() override;
|
void unregisterFolder() override;
|
||||||
|
|
||||||
|
bool socketApiPinStateActionsShown() const override { return true; }
|
||||||
bool isHydrating() const override;
|
bool isHydrating() const override;
|
||||||
|
|
||||||
bool updateMetadata(const QString &filePath, time_t modtime, quint64 size, const QByteArray &fileId, QString *error) override;
|
bool updateMetadata(const QString &filePath, time_t modtime, quint64 size, const QByteArray &fileId, QString *error) override;
|
||||||
|
|
Loading…
Reference in a new issue