Apper, KPackageKit reworked – part II – The Session Interface for Applications
Apper has greatly improved since my last blog post, still some issues to fix before releasing but major changes are finished for now. I changed the UI a lot, and in this blog post I’m going to show what I had wanting to do a long time ago. Hope you all enjoy it.
PackageKit is a freedesktop.org project which includes a DBus session interface so that “non-package manager” applications can ask for package management operations. For example you click on an video file and dolphin opens, now GStreamer can’t handle that file because it misses codec for that kind of file, instead of worrying which package the GStreamer has to install in *each* distribution, it just says: Hey I need a codec for mpeg 4. The PackageKit helper that sits on your DBus session will listen to that and inform the user.
This feature was already included in KPackageKit, but as I coded this on hurry to make feature parity with gnome-packagekit this interface was a bit ugly, the main problem of the implementation was that it used KMessageBox for the questions thus making a lot of popups coming up, so you click search the message box hides, the transaction shows, it then finishes and hide, and another UI to review the changes show up and so on… Apper now has custom KDialog that show all the stuff inside it, so no more pop ups!
Now that you got the idea of how this works, let’s let the screen shots talk:
Package Installation by Package Name:
Install Package Catalog:
Install Font Resources (I need to confirm if okular is using this afaik only a gnome doc viewer uses this):
Install Package that provide some file:
Mime Type Installer:
My favorite! This is available in KDE 4.7, you go to K menu, right click on an application and select “Uninstall”, with Apper you can even drag more items from Kickoff and drop on the Apper Uninstaller!
After you click Continue on any of the above dialog the result was/is:
Then you will see the confirmation dialog:
Transaction installing/removing packages:
And at the of an installation (be it by the package file or by any other means), you will have the confirmation and in case some application was installed you will be able to launch it right away (yes I need to add the K menu path…).
As you can see the new dialog act like a wizard improving the user experience by providing a consistent look. And yes the blue title bar was inspired on K3B
Now in your app you need some resource or package the session interface is described in:
The doc is not very complete but should be able to get an idea of what is possible to do with that.
Hope you all liked these changes!