Skip to content

Commit

Permalink
Fix Windows sidebar entry non vfs
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOneRing committed Feb 7, 2023
1 parent ca66ea8 commit df96efe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
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

0 comments on commit df96efe

Please sign in to comment.