kiwix-desktop icon indicating copy to clipboard operation
kiwix-desktop copied to clipboard

Remember the current directory path in the file explorer over restart

Open FractalU opened this issue 1 year ago • 8 comments

When opening a new zim file via Open file (ctrl + o) then the current directory path in the explorer gets reset to the path of the application directory over a restart.

I tested this on kiwix-desktop 2.3.1 on windows 7 and 10.

FractalU avatar Aug 04 '23 12:08 FractalU

@FractalU I can not reproduce the problem with Ubuntu (cutting edge version):

  • Default directory is the current one (if I launch the kiwix-desktop binary from my home, then this is home directory)
  • Once I have open a ZIM file once, the second time I open a ZIM file, the filepicker starts at the directory where the last ZIM file open was.

What would be the best behaviour to you? Would you just remember the path if I restart the kiwix-desktop (like you stated in the title)?

I would also challenge the fact the default path, might be better the "download" directory or even the "home" directory.

kelson42 avatar Aug 04 '23 13:08 kelson42

@kelson42 The best behavior to me would be that the path of the file explorer has been remembered after a restart of kiwix-desktop like I stated in the title. I don't know what would be the best default path of the file explorer. The default path should be practical. Maybe Downloads but I don't know. So, it's up to you to decide. Additionally, I tested this behavior on my Pop!_OS 20.04 LTS in a vm (Took me a while to figure out how to run an appimage). For me the current behavior is the same on Pop!_OS as on Windows.

FractalU avatar Aug 06 '23 20:08 FractalU

OK, at this stage, not sure what should be the proper behaviour. To some extend, I wonder if this is not the role of the OS to deal with this.

kelson42 avatar Aug 12 '23 07:08 kelson42

For comparision, I tested Libreoffice on Windows, Pop!_OS and PureOS. Libreoffice remembers the path of open file in the explorer over restart on all those OSes. Kiwix-desktop doesn't remember it over restart. I guess it's not a role of the OS and that it needs a proper implementation.

FractalU avatar Aug 12 '23 10:08 FractalU

I have implemented a solution to this issue. Only thing I was not able to come around doing is making the tags for the multiple languages correlated with import-dir-dialog-msg etc. I have setup the placeholders, just not generated the text.

sgourdas avatar Mar 14 '24 08:03 sgourdas

@sgourdas Please open a PR if you have commits you want us to integrate. (It seems you have tried to fix several bugs, and thanks for that. Open a PR per fixed bug as far as possible)

mgautierfr avatar Mar 21 '24 08:03 mgautierfr

@mgautierfr let me know if you need any further information to help close this.

I was also thinking of either:

  • Squashing the commits with a better commit message
  • Keeping them separated and changing the commit messages based on logic (memorization - setting)

sgourdas avatar Mar 28 '24 21:03 sgourdas

@sgourdas sorry for the late feedback our side. We will have a look to your PR but for me at that point it still not clear what should be the proper behaviour.

kelson42 avatar Apr 07 '24 18:04 kelson42