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

[Feature]: auto reopen last database #3623

Open
marez-janati opened this issue Apr 28, 2024 · 7 comments
Open

[Feature]: auto reopen last database #3623

marez-janati opened this issue Apr 28, 2024 · 7 comments
Assignees

Comments

@marez-janati
Copy link

Describe the new feature

im having to reopen the database every time i run the program .. i want it to remember it please.

Does this feature exist in another product or project? Please provide a link

No response

Do you have a screenshot? Please add screenshots to help explain your idea.

No response

@chrisjlocke
Copy link
Member

If you click 'File' and 'Recent files' you'll see a list of last used files. These also have a numeric prefix.
If you press Ctrl+this number (at least on Windows .. you didn't say what OS you use, but it should work in other OS's), that database will open.
So if you want the last used database, simply press Ctrl+1.

@lucydodo
Copy link
Member

@chrisjlocke has kindly already suggessted an alternative, but I think this would be a good idea to implement as a feature.
However, there is one thing I'd like to think about before implementing it.
What should DB4S do if the last opened DB file is inaccessible? (permission issue or removed file etc)
Should it print a warning message and automatically disable that option?

@lucydodo lucydodo self-assigned this Apr 30, 2024
@justinclift
Copy link
Member

Maybes some kind of warning like this?

Automatically loading the last opened database didn't work.

Database FOOO.sqlite not found at /home/foo/bar/FOOO.sqlite

@lucydodo
Copy link
Member

lucydodo commented May 1, 2024

Yes, that would be great. and would it be a more user-friendly design to disable the option with warning, and then if user open any DB files in that esssion, to re-enable it?

@justinclift
Copy link
Member

Interesting idea.

As it'll probably need to be a user preference of some sort anyway (Automatically load last-used database?), I wonder if it's possible to include a toggle option in the warning dialog when it fails to load?

If so, that'd probably make for the least amount of surprise:

Automatically loading the last opened database didn't work.

Database FOOO.sqlite not found at /home/foo/bar/FOOO.sqlite

[x] Keep trying to automatically load the last used database?

@lucydodo
Copy link
Member

lucydodo commented May 2, 2024

Cool, I'll try to implement it in free time this week. :)

@justinclift
Copy link
Member

Cool. 😄

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

No branches or pull requests

4 participants