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

Store last filepicker location in application settings #802

Open
egraether opened this issue Nov 26, 2019 · 3 comments
Open

Store last filepicker location in application settings #802

egraether opened this issue Nov 26, 2019 · 3 comments

Comments

@egraether
Copy link
Contributor

@egraether egraether commented Nov 26, 2019

After restarting Sourcetrail this location shall be used as the first default when opening a file picker dialog.

@Alvoda
Copy link
Contributor

@Alvoda Alvoda commented Jan 4, 2020

Is this still an issue?
If yes, could you be more specific about which file picker dialog is meant?
I assume it is "Open Project" on the splash screen?
Which class is used to store such things?

@mlangkabel
Copy link
Contributor

@mlangkabel mlangkabel commented Jan 5, 2020

Thank you for asking, yes, this is still an issue.

The class that implements this dialog is calles QtFileDialog. It is wrapping the QFileDialog and adds some more functionality. I think the methods that need to be changed are:

getFileNamesAndDirectories
getExistingDirectory
getOpenFileName
showSaveFileDialog

The filepicker location sould be stored in the ApplicationSettings.xml file which is managed by the ApplicationSettings class.

@Alvoda
Copy link
Contributor

@Alvoda Alvoda commented Jan 5, 2020

Thank you for your reply. The code is mostly uncommented, that makes it difficult to dive in.
I have a (very) small patch that does the job - i think.

So whenever you open a project the user/lastUsedProjectsPath gets updated and will be the default path for the next "open project" - even after restart.

I dont know if it makes sense to change every file picker dialog that way. Especcially of you create a new project its probably annoying and not very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.