Update on KDE-ish stuff

KDE/Kubuntu stuff

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.

4 Responses to Update on KDE-ish stuff

  1. Bugs Bane says:

    Nice work!

    Thanks for your continued improvement of a great little applet that for all intents and purposes appears “done”. I’m sure it would have been very easy to just call it “good enough” but now it’s even better! \o/

    I adore the QuickView applet. It’s the most flat-out useful that I’ve found (ok maybe after kickoff!).

    One major usability problem that would be extraordinarily easy to fix:

    The up arrow icon that appears in the top left corner. It doesn’t take you up one folder level like it does pretty much everywhere else in KDE (Dolphin, Konqueror etc). It takes you back to your home folder. Wouldn’t it make more sense to use the “Home” icon from Konqueror (the house)? Yes, I know that people can change the settings so that it doesn’t go to ~. That’s exactly the same as how they can change their home page in Konqueror to anywhere they like and have the Home icon take them there.

    So in short, one of two things should really happen:

    a) The up arrow takes you one folder up, replacing the left arrow bar, or better yet…
    b) Just replace the icon in the top left corner with the Home icon!

    I’ve seen two people click on the up arrow meaning to go up a folder, be totally confused when they suddenly appeared in a “random folder” (they didn’t understand). This would be so very easy to fix!

    Anyway, in the time I’ve wasted getting you to read this it probably could have been fixed already, so I’ll just say so long and thanks for all the fish / efforts with KDE / Kubuntu. It’s all appreciated.

  2. Yves Glodt says:

    Please list removable devices as well in quickaccess๐Ÿ™‚

  3. JontheEchidna says:

    Actually, I did replace the “Up” icon with a “Home” icon on Friday.๐Ÿ˜› That had been bugging me too.

    On the topic of removable media, I think I could probably do something like FolderView does. FolderView lists all the removable media in its settings dialog, where you can set it as the location from there.

  4. Yves Glodt says:

    QuickAccess (on my kde 4.3 beta1/kubuntu) on top shows the “/home/yves” entry (which animatedly shows the “Open”button while hovering).

    May I suggest putting the available removable devices simply on top of this entry? Maybe separated by a separator?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: