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

Bugfix: add open local/remote folder options #9420

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

erikjv
Copy link
Collaborator

@erikjv erikjv commented Feb 4, 2022

Add the "open local/remote folder" context menu items for non-sync-root
items back into the accounts tab in the settings dialog.

#9405

src/gui/accountsettings.cpp Show resolved Hide resolved
src/gui/accountsettings.cpp Outdated Show resolved Hide resolved
auto info = _model->infoForIndex(index);
OC_ASSERT(info);
if (auto info = _model->infoForIndex(index)) {
QAction *ac = menu->addAction(tr("Open Remote Folder in Browser"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see addAction(openLocallyLabel, this, []{

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open in web browser maybe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I wanted to make it clear that it's the remote folder that's being opened. But maybe that's too obvious. What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but what is a remote folder :D
and we should align it with the others.

image

auto info = _model->infoForIndex(index);
OC_ASSERT(info);
if (auto info = _model->infoForIndex(index)) {
QAction *ac = menu->addAction(tr("Open Remote Folder in Browser"));
QString path = info->_folder->remotePathTrailingSlash();
path += info->_path;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the root folder this results in //

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, remotePathTrailingSlash() only appends the slash if there isn't already a trailing slash.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes but info->_path will be /

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried :D

@erikjv erikjv force-pushed the work/fix-opening-folders branch 2 times, most recently from 7268a82 to 1ae5944 Compare February 4, 2022 17:54
Add the "open local/remote folder" context menu items for non-sync-root
items back into the accounts tab in the settings dialog.

#9405
@sonarcloud
Copy link

sonarcloud bot commented Feb 10, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@TheOneRing TheOneRing merged commit 8b2e9f3 into 2.10 Feb 10, 2022
@TheOneRing TheOneRing deleted the work/fix-opening-folders branch February 10, 2022 10:53
erikjv added a commit that referenced this pull request Feb 10, 2022
TheOneRing pushed a commit that referenced this pull request Feb 10, 2022
@TheOneRing TheOneRing mentioned this pull request Mar 10, 2022
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants