KIO Goodies
KIO (KDE Input/Output) is what allows KDE applications to transparently and asynchronously access files, both local and over the network. It also provides many of the user interfaces for manipulating files, such as the Places panel, Open/Save dialog, folder properties, new file menu, and many more. The other day I went through some of its dialogs and gave them a slight overhaul.

When clicking an executable file, it confirms whether to really run it. In case of text-based programs, like shell scripts, it further offers to open it in the default application (usually a text editor). Previously it merely asked “What do you wish to do with this file?”. Now it actually includes the application icon, name, and type of file, to let you make an informed decision. While this might seem redundant, it’s possible that you are launching it from a place other than the file manager where the file might not in fact be just behind the dialog. In my opinion, it also makes it a lot nicer looking.
Including the name of the application that will open the file (e.g. “Open with Kate”, similar to the download finished notification) makes it a lot clearer what button will launch the file and what will just view it. For some reason I’ve always had a hard time picking the right option without thinking about it first – a mere “Open” felt somewhat ambiguous here.

The dialog that lets you pick a file name for a new file or folder received similar treatment and now displays the file type icon. It’s a nice visual touch that lets you know what the item you’re about to create is going to look like. More importantly, though, it now offers a selection of folder colors and icons! This way you can assign a custom icon to a folder as you’re creating it. This makes the fact that this is possible a lot more obvious.
It additionally remembers whether you expanded the icon section. If you use the feature, you’ll get it right then and there, and if you don’t, it shouldn’t bother you. It further keeps track of what custom icons you have picked, if any, so that over time the list will contain all the folder icons that you commonly use. We’re also considering to add a context menu entry to quickly assign colors and icons after the fact, implementing a long-standing feature request.
Finally, the Open/Save file dialog provided by the XDG Desktop Portal (typically used by your web browser and Flatpak applications) are properly modal to their parent application. Qt 6.8 brought support for the XDG Dialog protocol that enables windows be marked as modal. However, Qt only used it if the dialog’s parent window was in the same application. I fixed that for the upcoming Qt 6.10 (luckily it’s allowed to mark a dialog as modal without a parent window and then assign one afterwards) but in order to get this issue resolved for our users right now, I adjusted KWindowSystem to use XDG Dialog, too, when running a more contemporary Qt version.

Leaving the subject of dialogs, a while ago I added a busy indicator to the Places panel while devices are being (un)mounted. It now also shows while the trash is being emptied, should there be lots of stuff in it that takes a while to get rid of. The Trash widget in Plasma does so, too. While at it, I fixed bringing a running Dolphin instance to the front when clicking the Trash widget placed in a panel.
Last but not least, KIO finally prevents the system from going to sleep while copying or moving files!