ChaniBlog











so today was officially the start of summer of code, but I wasn’t at my computer. I spent the day playing in the dirt ;)

We were woke up this morning by the arrival of a truckload of dirt – we weren’t actually expecting it until the afternoon. soon after that, my friend showed up with a bed for me. yay, real bed, no more futon mattresses on the floor :) so we got the bed set up, moved some of the dirt, and had some breakfast.

once breakfast was dealt with, I went out to help pete with the humongous pile of dirt. it was a LOT of dirt. a mountain of it. way more than we needed. anyways, he asked me to do some weeding – the morning glories needed to be pulled out. I was a bit disappointed at first ’cause I think they’re pretty, but then I saw why they must be killed: they were everywhere. around the deck, under the deck, *in* the deck, around the house, and of course in the flowerbeds.

so, I started tearing it up. the more I pulled, the more I got. I ended up kneeling in the dirt, following the root systems and pulling them out as much as possible. the roots had gone right *through* the planks that were the border of this flowerbed, and when I realised one plank was loose and pulled it up, I just saw a huge mass of roots. I was digging about 6 inches down getting as much out as I could. eventually I took off my shoes because they kept cutting off circulation to my feet. I was pretty dirty already by then. it was fun :D

while I was digging up roots, pete was shoveling and wheelbarrowing dirt around. he covered the backyard, gave some of it to neighbours, covered the space beside the deck (after mowing the area and putting down some layers of grass clippings and cardboard), put more dirt on everything, and *still* had a big pile of it sitting in the alley, and the sun was starting to go down… so he moved that pile as much onto our property as possible – I came to help with the last bit of that as I’d finished clearing the flowerbed – and then we headed inside for dinner. hooray for roommates cooking. (they weren’t around for most of the yardwork because they had to go to work.)

of course, I had to shower before eating, since my hands and legs were totally covered in dirt. :) it took a lot of scrubbing to get most of it off. I still have a little on my hand. :P

now I’m fed, and tired, and… holy crap it’s almost 10pm. the day is pretty much over, and I haven’t had any time to code. Tomorrow I should be back on the computer, though. lots to do. :) according to my schedule I’ve given myself three weeks to get plasma and a screensaver displaying properly together, but I do hope it won’t take that long… I’d really rather have that happen tomorrow ;) gotta have those unreachable goals to aim for, y’know.

oh, and keyboard shortcuts have changed slightly for the sake of non-US keyboards. they may change again (specifically, ‘zoom in’ probably will).



{May 23, 2008}   state of the ZUI

another thing I’ve been chipping away at for 4.1 is the ZUI. it’s far from complete, but it’s at least becoming something I actually use now. :) keyboard shortcuts can be used to navigate it quickly (see my previous post), clicking a containment will make it the active one (barring the focus bugs mentioned in that post), and notmart has amazingly made the cashews actually show up in the right place! :)

I also added an option in the contextmenu for removing activities. right now you can only remove ones that aren’t active (ie when you call up the dashboard you don’t get that containment shown) but it’s pretty useful when you’re playing around and add way more than you actually want. :)

Oh, and if you don’t want to zoom out, you can use the keyboard shortcuts to switch containment instantly. my extreme laziness leads to features like this. :)

There are some features I didn’t get to, though… I wanted some kind of visual clue as to which containment is active, but seeing as I haven’t even started to think about how to implement that and soc starts monday, I doubt it’ll happen for 4.1. I also wanted a way to change which plugin the current containment uses – kinda ‘swap out’ the containment under all its applets, so that you can go from defaultdesktop to blankdesktop to folderview at will. At the same time, I wanted to kick the theme config out of the defaultdesktop config, because it really doesn’t belong there – but there was really no time for that, and anyways, the other containment changes coming in 4.2 might mean someone else handles that :)

There are some rather obvious bugs in the ZUI right now – dashboard has issues with containment switching, and you can’t drag the view around while zoomed out any more – but I’m confident those will be fixed for 4.1 :) so we should have something simple but useful. with the keyboard shortcuts you don’t have to keep moving your mouse to a toolbox and finding the buttons, and with a single click you can choose the containment you want, so hopefully I’ll find myself making use of the ZUI more regularly from now on. :)

just… if you have two monitors… don’t zoom out both at once. trust me… just don’t.

As for the future of the ZUI… there’s still lots to be done. some of the bugs I run into are making me think that there’s a bigger problem. I’ll have to do some deep thinking about the design… what really belongs in the desktop toolbox? should we have some other tools elsewhere or something? what changes should be made to the fully-zoomed-out level? how do we handle multiple views without madness?

I have a feeling there were other zoomy things I was pondering, but it’s past my bedtime now. I’ve barely left the computer in over 12 hours :/ but I’ll be out in that big blue room all day tomorrow, so I guess it balances out in the end ;)



I may not have blogged in a while, but I’m still programming. last week I was obsessing over keyboard shortcuts; I was bloody sick of having to use my mouse so much in plasma, especially since my poor laptop mousepad isn’t as reliable as it used to be. I was also annoyed at all the different scraps of code I saw scattered everywhere for common actions like “zoom out” and “configure $foo”. after thinking about these two problems for a while, I realised that they were actually one. I spent some time pondering the interconnectedness of all things, but eventually realised I was going to have to *write* some code instead of just thinking about it. ;)

Anyways, the root of the problem is that hardly anyone was using QActions, and where they were using them, they were just creating their own and then throwing them away. silly and wasteful. so, I gave each Applet a KActionCollection, and dropped some useful actions in there. I rounded up a bunch of code that had been creating its own actions, and made it just grab the ones from the collection. I added keyboard shortcuts to the actions. I even added some new actions for stuff like moving focus to different applets and different containments – those are only used for their keyboard shortcuts, but they go in the same little collection where I can keep an eye on them. :) Oh, and the toolbox also uses these actions now. hooray, less duplicate code!

Now, with all these actions rounded up and duplicates removed, I only needed one block of code for each change to them. when you lock plasma, the “lock widgets” text changes to “unlock widgets”, and the icon changes too. I now just have one place where this happens, and instantly the change applies to the toolbox and the contextmenu – previously the toolbox lock button didn’t change its icon at all, but now little inconsistencies like that are gone. When you lock plasma, the “add widgets” action is disabled too – one line of code and it’s gone from the toolbox and the contextmenu, and the keyboard shortcut goes away too.

Of course, I did run into a few little problems while doing this. QGrapphicsView and co. haven’t really got proper keyboard shortcut support. I can’t seem to add actions to QGraphics items. luckily, KActionCollection has a handy function to associate a widget with its actions – so, I cheat and associate an applet’s actions with the view while it has keyboard focus. The next problem was that clicking a proxywidget can give it text focus, but doesn’t give any notice of this to the rest of the graphicsscene – so, if you’re using plasma keyboard shortcuts on one applet, then click on another applet and happen to click a proxywidget (like the text entry part of the notes applet), plasma shortcuts will still apply to the previous applet. I haven’t thought of a way around that, so it’ll probably be that way until qt brings a fix. :( Then there was the realization that since the panel refuses to take focus, I can’t really use the keyboard with it. Yuck. The solution to that seems to involve changes to kwin, but I was busy and then that feature freeze snuck up and hit me over the head… so… no keyboard accessibility for the panel until 4.2 :(

There are some other things I was hoping to do that’ll have to wait until 4.2 as well. the most glaring omission is that you can’t configure the keyboard shortcuts. :/ sorry. I was so busy making them actually *work* that I didn’t have time to make them configurable, and since I bet that’d involve adding strings and other such non-freeze-compatible changes, I doubt I’d be allowed to do it while this damn freeze is in place. The next biggest thing is that we were planning to have shortcuts to jump to specific applets. that part kinda slipped my mind too, and I think it’s probably too late now. maybe it’d be possible for certain applets to put in hardcoded shortcuts (I’m thinking kickoff here) but you won’t see user-settable ones until 4.2.

Some of these shortcuts are discoverable by looking at contextmenus, but others are very well hidden. their default values are pretty arbitrary, too. so… well, here’s a list.

add widgets: ctrl-a
lock widgets: ctrl-l
zoom out: ctrl--
zoom in: ctrl-= or ctrl-+
next applet: ctrl-n
prev applet: ctrl-p
next containment: shift-ctrl-n
prev containment: shift-ctrl-p
applet settings: ctrl-s
containment settings: shift-ctrl-s (doesn't work on the default containment yet. should be fixed soon.)
remove applet: ctrl-r
add activity: shift-ctrl-a

I really wish I’d been able to get more code written… but some keyboard accessibility is better than none. :)



et cetera