Well, it’s been a full week since I moved to London, and everything is coming along quite nicely. The house is really cool, with a big bedroom and an even bigger dining room. It’s still missing some bits of furniture, like a dining table and its chairs, but the Ikea is going to have yet another visit from me and Marta; there’s something reassuring in the way Ikea shops look all the same in every country you are – like a beacon in a sea of strangeness: cars on the wrong way, public transportation and bureocracy that work, upholstery even in the bathroom, etc. Anyway, I think that I’ll just get used to it. Well, to most of it. :-)
Growing Family
I’ve just finished including baobab, the disk usage analysis tool written by Fabio Marzocca (and others), into gnome-utils HEAD. Everything seems to build fine, and make distcheck
has just confirmed that gnome-utils-2.15.0 is ready to be released. I plan to give the final touches before the deadline of tomorrow, so that the first unstable release of Gnome will ship the growing family of gnome-utils.
Now Listening: The Decemberists, Picaresque
Feeling yourself disintegrate
life: In the past 24 hours I’ve had:
- a bad cold
- a sore throat
- some lines of fever
- water spilled on my laptop’s keyboard
- thus, a broken Ctrl key that would not disengage itself
- and, finally, a broken Ctrl key that would not work anymore
The last problem was solved by switching Caps Lock and Ctrl (thanks to the Gnome keyboard capplet; but I’d prefer to be able to use the windows key as a replacement, as it’s nearer to the original key), as my finger memory could not adapt to using the right Ctrl key for stuff like workspace navigation.
doap: like all the cool kids, I’m too working on a way for handling DOAP streams, except that I’m doing it in Perl and not in fancy Python (I’m using the Redland library, though). Unfortunately, there’s no such Perl module for basic handling FOAF and DOAP data – so I’ll need to create them first, then work on a nice authoring interface.
perl: also, I’ve been working on Perl bindings for the Maemo libraries, as one of the goals for the 2.0 version of the platform is having language bindings working. From inside the scratchbox (version 0.9.8.5 comes with perl 5.8.4), I downloaded the GLib and Gtk2 modules from CPAN, and even with some failures, they basically worked out of the box; then I began binding stuff (hildon-lgpl, hildon-libs and hildon-fm for starters, libosso will be next, as it needs the DBus perl bindings), and in less than twenty minutes I had my own nice little hello world application written (sorry, no screenshot at the moment).
Now Listening: Led Zeppelin, Stairway to heaven
For the price of a cup of tea
Here’s a screenshot of testaction
test showing the GtkRecentAction
action for use with the GtkUIManager. The action is bound to a menuitem
tag inside the UI definition markup.
The code needs cleaning up and the hooking up of the GtkRecentChooser
interface virtual methods, but it’s not a big issue; setting all the recent chooser knobs using the recent chooser API is not the most beautiful approach I could come up with, though. But so is setting all the properties using specially crafted functions.
The next issue is inlining the list inside a menu (to make the Gedit maintainers happy ;-)). The current (and soon to be deprecated) EggRecent code used the awful EggRecentViewGtk
object and its evil spawn (EggRecentViewUIManager
and the most devilish EggRecentViewBonobo
). The GtkRecent approach “get the list from the recent manager and build the menu items” works for hand-built menus, but for menus created using the UI manager there’s no real option, as there’s no way to create a list of items from a GtkAction
. One way to implement it might be adding a GList * (*create_menu_items) (GtkAction *action);
virtual method inside GtkActionClass
.
Update 2006-04-18@03:51: the tracking bug with my initial draft for the GtkRecentAction
is #338843
Now listening: Belle and Sebastian, The Life Pursuit
ChangeLog
moving out: Marta has been in London a couple of times, in these two weeks; she has found a nice house in Crystal Palace, and began to buy furniture and stuff, and preparing it for us to move in. Next week, we’re both going to London and buy the remaining stuff (a sofa-bed, a table for the living room and some chairs to begin with). We should return in Milan for a couple of days on the 4th of May, as we must sign documents and papers for the marriage, and actually choose its date (it’ll be in July, probably).
gtk+ recent: the merge went well; on the gtk-devel list, Murray Cumming pointed out a couple of issues; most notably, the lack of integration with the GtkUIManager
. The plan was to add a placeholder tag to the markup used to build the UI, but I really don’t like this approach anymore: it’s inherently messy. As a replacement, I coded up in a couple of hours a new GtkAction
subclass: GtkRecentAction
; when bound to a menu item tag, it creates a new submenu hooked to a GtkRecentChooserMenu; when bound to a toolbar item tag, it creates a GtkMenuToolButton
like the one Gedit uses for the Open toolbar button. Unfortunately, I still can’t see a way to hook up an inlined list of menu items. Well, I suppose I’ll have to file a bug to the HIG and have it changed to use submenus for the list of recently used files. ;-)
gnome-utils: good news everyone: I’ve asked Fabio Marzocca for his permission to include into the gnome-utils package the fine disk usage tool called Baobab that he wrote; he agreed, and work is underway to clean up the code and hook it up to the gnome-utils build, in order to have it ready for the 2.15.1 release. Also, work is underway to add Solaris support to the system log viewer, and I’m fixing up a bunch of open bugs for the dictionary, including the re-addition of the “speller tool” (the list of matching words showed if no definitions were to be found).
EpS.O.B.
Davyd is absolutely right: steer away from any new-ish Epson printer you see, no matter how cheap they throw it at you.
When I was living with my parents, I “inherited” an old StylusColor 760 – easily the best printer I’ve ever had under Linux. When I moved in with Marta, we decided to buy a combined scanner/printer CX3650 (it came cheap at ~100€). Making it work under Ubuntu wasn’t that hard: only the scanner required adding a line in /etc/sane.d/epson.conf
; it actually required more work for installing it on Marta’s iBook. But unless you print at least a page every day or so, the ink solidifies on the heads and creates white stripes on the printouts. You try and clean the heads, and you get a puddle of ink on the bottom, which marks the paper.
To make a long story short: the printer is now sitting on a shelf, disconnected, and I’m really thinking about buying an HP – which would suck, because I still got a perfectly working scanner attached to a useless printer.
Unless, my dear Lazyweb, someone knows a way to clean the heads of an Epson without a) calling tech support or b) destroying the chassis. Thanks.
Lazy loading
Little post about a useful design pattern in GLib and GTK, written down after a question on the #gtk+ channel
While I’m not Philip and I won’t go as far as talking about this in public, I wrote down a simple design pattern for lazy loading stuff from a list into a GtkTreeView
without blocking your interface or using threads.
The API has landed
The GtkRecent code is finally in gtk+ HEAD branch.
A couple of things are still missing, mostly documentation and examples (the exact list is here, if you want to check).
The code needed a year to take shape (I was beginning to mull over it a bit too much), but it is cleaner, more efficient and works better than the EggRecent code, that has been copied and pasted all around the world.
The heroes of this tale are undoubtedly: James Willcox, for writing the original code (even if he didn’t reply to my email about its state bad boy, bad boy); Federico Mena-Quintero, for listening to me while we were waiting at a terrible restourant in Stuttgart, and for saying: Go ahead, implement it, and everyone will love you!; Matthias Clasen (still no blog, Matthias?), for helping and suggesting and asking and for maintaining the Best. Toolkit. Ever.
This work is dedicated to my soon-to-be wife, Marta, and for the patience she had while I hacked till the wee hours of the morning. I love you.
And this is just the beginning… I sense bug reports coming…
Merger
Seems that I’m being syndacated… aggregated… whatever… on a Planet, so hi!
I’m starting merging the GBookmarkFile
parser into my local copy of GLib’s HEAD
branch (the tracker bug is #327662). I’ve created a testb suite and a bunch of invalid and valid bookmark files, in order to test it – and they actually helped me find a couple of stupid regressions that I had introduced.
Pending review of the patch by Matthias, the code should go in GLib first thing next week; once GBookmarkFile
is in, the recent manager and the related widgets are due to go in the following days. Right now, I’m writing a patch for GTK’s HEAD branch – stay tuned for a tracker bug about it. Update 2006-03-27@00:31: bug #336121.
Whoa, just a couple weeks shy on a year since I began writing the Perl bindings for the egg-recent code – which is the reason that forced me to open that can of worms and where all the recent files rewrite really began. Never thought that it would take this long, or that it would take me this far. Well, actually I never really thought I had some chances of actually contributing something to the platform libraries at all.
Now listening: Burning down the house, Talking Heads
ChangeLog
Long time, no blog.
Here’s a brief recap of what happened in the last three weeks:
- Matthias Clasen has began reviewing the Recent Documents code, and we are planning to get it merged beginning next week; I sent a recap to the gtk-devel mailing list, and I’ll send the draft for the Desktop Bookmark specification on the xdg mailing list at fd.o (like I did a year ago, but now I have a working implementation);
- GNOME 2.14 is out!
- gnome-utils 2.14.0 is out too!
- Me and Marta went to London, last week: she went to look the premises of the London School of Economics, as she’ll be taking a MSc there starting from September; me, I met with Matthew Allum, and following the arrengements we made at FOSDEM last Februrary, I signed a contract for working with the great guys at OpenedHand.
- And last, but not least (or I would be in trouble), I’m getting married!