Hmm, it’s been a while.
Right off the bat I’d like to say that I failed at getting user-defined wallpapers in shape for KDE 4.3.😦 Things have been pretty busy for me; Kubuntu 9.10 was opened for development and we were knee-deep in package merges. Then I went on a trip the week before string freeze and was unable to do any development work whatsoever. By the time I got back school took up the remaining time I had left, and as a result the Weather Wallpaper is not sporting user-definable weather/wallpaper pairings.
I do have a patch now that re-inserts the pushbutton for the advanced dialog where all that is configurable (it was lost in the port to libplasmaweather) but it’s way past string freeze now. There is also a fiddly problem where the custom wallpapers only work in the preview in the Desktop Settings dialog or inside the plasmawallpaperviewer. I’m going to have to just revisit this in 4.4 I suppose.
On the brighter side of things, I’m really enjoying developing for Kubuntu 9.10. Our “Universe” packages for third-party KDE-related software are looking good so far, and we have some really neat ideas for this next release. In fact, most of the guys are away at the Ubuntu Developers Summit as we speak, further formulating these
evil plans. After having an at-home UDS sprint of my own, I had some time to work on QuickAccess.
QuickAccess 0.9 news
When I first took over QuickAccess development when the author disappeared and the widget was in an uncompilable state for KDE 4.2, one of the first things I noticed were that:
- It used a lot of custom code
- A lot of this custom code could be replaced with proper stuff from KDE
Unfortunately, I took over development right before Kubuntu 9.04 was released, and due to time constraints and Kubuntu being in every freeze imaginable, there wasn’t time to cruft-crush. But now with everybody away at UDS leaving nobody to sponsor my packages to Main and now that I’ve done pretty all that I see needs done in Universe, I’ve had time in the latter portion of this week to finish my early attempt at cleaning up QuickAccess.
The main cleanup came in replacing the ResizeDialog class. It’s basically a Plasma::Dialog with resizing implemented by itself. All that I can assume is that back in the day Plasma::Dialog’s weren’t resizable? Anyway, the bulk of the work in this refactoring came from porting QuickAccess over from an IconWidget that presented a ResizeDialog when clicked to a proper Plasma:PopupApplet . A PopupApplet remains as a normal widget on the desktop but turns into an icon that presents the widget when clicked in the panel.
This, unsurprisingly, fixed a ton of bugs:
- We now get resize handles when hovering over the corners of the applet
- Plasma no longer crashes when you drag a folder or file to the desktop
- The keyboard shortcut settings now work
- The applet now remembers its size on the desktop. (and is actually an applet instead of a little icon!)
This, also unsurprisingly, introduced a few new regressions that I have yet to figure out/fix:
- Opening the “properties” dialog of a file while the widget is in the panel causes the entire dialog to go empty
- The same disappearing trick happens on the desktop, except the file properties dialog doesn’t appear.
Dunno what’s causing that, but I would like to get that fixed before 0.9 is released. (Otherwise it looks pretty good to go)
I also noticed that there was this IconManager class that seemingly provided file previews. It was copyrighted by Peter Penz and a quick Google told that it actually came from Dolphin, though I could not see it in the current source. It turns out that since KDE 4.1 that class went through an API review, was renamed to KFilePreviewGenerator, and was moved to kdelibs. (And also got many, many speedups and bugfixes along the way) So that was a no-brainer; IconManager got the axe quick, and QuickAccess now generates file previews like the rest of KDE.
On the subject of file previews, I stole the advanced preview configuration code from FolderView, so now fine-tuning the preview settings in QuickAccess should work more like FolderView in that regard. (Folderview’s file preview settings implementation was much simpler and had a cleaner UI) I also turned on directory previews on by default, so if you have the icon size set large enough (22×22 or higher) you should see KDE’s nifty directory previews like in Dolphin.
There are still other bits of code like QuickAccess’s Settings class that could probably be done away with, (There’s a bunch of scary stuff for detecting when settings need to be saved and such) but since the settings stuff “works” for the moment it’s of a somewhat lower priority. It will save 343 lines of code or so if it gets removed, so it is something that needs to be done eventually.
Speaking of lines of code, after this cleanup, QuickAccess has 3,030 lines of code. This is down from 4,233 lines, meaning that 1,203 lines of code got removed, or about 28.5% of the original code base.
I’ve also done a little bit of good old fashioned bug-busting too.🙂
QuickAccess’s ItemView class is based heavily off of Kickoff’s flipscrollview class, and shared some of the same bugs, such as a “phantom drag” appearing after you drag/drop something. This was fixed in KDE 4.3, and I’ve made the same fix to QuickAccess. I also nabbed an RTL fix from Kickoff, and now the back arrow button should face properly on RTL systems.
All in all I’m pretty excited about QuickAccess 0.9.🙂
I’m going on a short weekend vacation later this afternoon, and won’t be back until Sunday. So bye until then.