[Feature]: auto reopen last database · Issue #3623 · sqlitebrowser/sqlitebrowser · GitHub
Skip to content

[Feature]: auto reopen last database #3623

Closed

Description

@marez-janati

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

Activity

  1. chrisjlocke commented on Apr 29, 2024

    @chrisjlocke
    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.

  2. lucydodo commented on Apr 30, 2024

    @lucydodo
    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?

  3. self-assigned this
    on Apr 30, 2024
  4. justinclift commented on Apr 30, 2024

    @justinclift
    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
    
  5. lucydodo commented on May 1, 2024

    @lucydodo
    Member

    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?

  6. justinclift commented on May 1, 2024

    @justinclift
    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?
    
  7. lucydodo commented on May 2, 2024

    @lucydodo
    Member

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

  8. justinclift commented on May 2, 2024

    @justinclift
    Member

    Cool. 😄

  9. lucydodo commented on May 25, 2024

    @lucydodo
    Member

    Sorry for the delay, I actually forgot about it. By the way, I thought it would be better to add the option to the recent file lists instead of in the preferences, so I added it there, what do you think? does it look okay?

    image

  10. added a commit that references this issue on May 25, 2024
    15fbd77
  11. lucydodo commented on Jun 6, 2024

    @lucydodo
    Member

    Well, I didn't hear back for about two weeks, so I pushed it to the master branch as implemented.
    If anyone has any feedback on this feature, please leave a comment.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions