Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Only use xdg-open to launch file-manager #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

worldofpeace
Copy link

xdg-open is described as the following

Utility script to open a URL in the registered default application.

In general deepin-screenshot should respect whatever file manager a user has configured as default.
So if someone has dde-file-manager yet they don't want to use it as default, it won't be respected in this application.

It's much preferred to use the default file manager
configured by the user.
} else {
command = QString("xdg-open,%1").arg(filePath);
}
command = QString("xdg-open,%1").arg(filePath);
Copy link
Contributor

Choose a reason for hiding this comment

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

The change breaks the old behavior, we can't accept that, maybe you can try DDesktopServices::showFileItem from DTK to see if that satisfy your need?

Copy link
Author

Choose a reason for hiding this comment

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

Can you explain how this breaks the old behavior?
If I understand correctly, on Deepin (the os) this would still
start dde-file-manager because it's default.

Also, any docs on DDesktopServices::showFileItem?

Copy link
Contributor

@hualet hualet Apr 19, 2019

Choose a reason for hiding this comment

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

The original code

QString("/usr/bin/dde-file-manager,%1?selectUrl=%2).arg(fileDir).arg(filePath)

opens the target directory and select the target file. xdg-open won't do that.

DDesktopServices::showFileItem basically did the same thing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants