Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Windows sidebar entry non vfs #10481

Merged
merged 2 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/unreleased/10481
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bugfix: Fix generation of Windows sidebar enty with vfs off
TheOneRing marked this conversation as resolved.
Show resolved Hide resolved

https://github.com/owncloud/client/pull/10481
6 changes: 6 additions & 0 deletions src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,12 @@ bool Folder::groupInSidebar() const
return false;
}

void Folder::setNavigationPaneClsid(const QUuid &clsid)
{
_definition.navigationPaneClsid = clsid;
saveToSettings();
}

bool FolderDefinition::isDeployed() const
{
return _deployed;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/folder.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class Folder : public QObject
*/
QString remotePathTrailingSlash() const;

void setNavigationPaneClsid(const QUuid &clsid) { _definition.navigationPaneClsid = clsid; }
void setNavigationPaneClsid(const QUuid &clsid);
QUuid navigationPaneClsid() const { return _definition.navigationPaneClsid; }

/**
Expand Down
12 changes: 5 additions & 7 deletions src/gui/folderman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -914,9 +914,6 @@ Folder *FolderMan::addFolder(const AccountStatePtr &accountState, const FolderDe
emit folderListChanged();
}

#ifdef Q_OS_WIN
_navigationPaneHelper.scheduleUpdateCloudStorageRegistry();
#endif
return folder;
}

Expand Down Expand Up @@ -1399,10 +1396,11 @@ Folder *FolderMan::addFolderFromWizard(const AccountStatePtr &accountStatePtr, c
if (!newFolder->groupInSidebar()) {
Utility::setupFavLink(localFolder);
#ifdef Q_OS_WIN
// TODO: move to setupFavLink
// TODO: don't call setupFavLinkt if showInExplorerNavigationPane is false?
if (_navigationPaneHelper.showInExplorerNavigationPane())
folderDefinition.navigationPaneClsid = QUuid::createUuid();
if (_navigationPaneHelper.showInExplorerNavigationPane()) {
newFolder->setNavigationPaneClsid(QUuid::createUuid());
// we might need to add or remove the panel entry as cfapi brings this feature out of the box
FolderMan::instance()->navigationPaneHelper().scheduleUpdateCloudStorageRegistry();
}
#endif
}
if (!ConfigFile().newBigFolderSizeLimit().first) {
Expand Down