SUMMARY When I want to save a file that has not been saved yet or select one of the different "Save as" menu items, the file browser dialog that opens, initially shows the folder in which Kate is installed, e.g. "C:\Program Files\Kate\bin". It would be more convenient, if the file browser would initially show the user folder of the currently logged in user, e.g. "C:\Users\Matthias". This is as I saw a duplicate to bug 163443. Nevertheless, I would prefer that on Windows, Windows-like behavior is used. Is there the possibility to conditionally compile Kate for Windows and for Linux, so that the Windows version uses the user folder and the Linux version uses the working directory as default? STEPS TO REPRODUCE 1. Save a not yet saved document OR Select a "Save as" menu item 2. The file browser dialog opens with the folder "C:\Program Files\Kate\bin" as default. OBSERVED RESULT The file browser dialog opens with the folder "C:\Program Files\Kate\bin" as default. EXPECTED RESULT The file browser dialog opens with the folder "C:\Users\<UserName>" as default.
You are right that this is suboptimal. Unfortunately, that is not just one place and one would actually like to check if one was launched via a terminal windows and only use the home dir in the cases one was not launched there.
What speaks against always using the user's home folder as default folder for the save dialogs? It is in my opinion what most users would expect, especially on Windows. Moreover, in Windows, kwrite/kate will almost never be started from a terminal window, only by using the start menu or by double clicking a file in the explorer. It's really annoying that when saving a document, one has always to navigate to the documents folder in the user's home folder first before you can save the file. Moreover, I don't think, that there is a way in Linux or Windows for querying whether one has been started from a terminal window, or by other means.
https://invent.kde.org/packaging/craft-blueprints-kde/-/merge_requests/43 Partially addresses this, but only when Kate is launched via the shortcut (e.g. Start Menu), which I think is the main method in windows. Previously, the working directory of the shortcut was set to the installation folder, and kate sets the file picker's initial location to the working directory.
Does this also work if I pin kwrite to the taskbar and open it from there?
(In reply to fliegenblues from comment #4) > Does this also work if I pin kwrite to the taskbar and open it from there? I just tested this right now (for Kate), and it seems to work for Right Click > Pin to taskbar as well as on "Pin to Start" and "Pin to taskbar" on the Start menu. I don't know how Windows handles the "Pin to" stuff, but I think what happens is For "Pin to taskbar", a copy of the shortcut (if it exists) is placed on the taskbar, and changes to the original shortcut won't be reflected. For "Pin to Start", changes to the original shortcut are propagated. So I think it will work, as long as you set the working directory of the original shortcut first BEFORE pinning to the taskbar
Fixed with https://invent.kde.org/packaging/craft/-/merge_requests/14