Song for Sunshine

I just made two releases for gnome-utils: the first is 2.16.2, another release in the stable branch, which fixes a couple of bugs in Baobab and Screenshot that were also fixed in HEAD and deemed important enough to be backported.

The second release is – finally – 2.17.0, the first release of the new unstable release cycle which will lead to gnome-utils 2.18.0.

The major change in this release is in Baobab, which acquired the new, spiffy, cairo-based ringchart view, thanks to the hard work of Fabio, Paolo, Alejandro and Miguel. Baobab also dropped the search option, which mostly replicated the Search Tool already included in gnome-utils. Baobab user interface was cleaned up, its memory consumption was reduced and many bugs were fixed.

The other modules in gnome-utils got some love, but not much; my development tree still doesn’t build well and it’s not ready for inclusion in HEAD, but I plan to work on it before the next release.

As usual, download, test and file bugs.

Little Earthquakes

After two weeks without working on it, this evening I finally returned to GtkUnique and finished the bacon-like backend. Now, beside using D-Bus and Xlibs, you can use Un*x sockets as an IPC method to send a command to a running instance of an application which is using GtkUnique.

Next items in the TODO are:

  • Add more documentation on the protocol used in the three backends;
  • Fix the Perl bindings;
  • Finish and publish the Python bindings;

In the meantime, you can grab GtkUnique 0.5.0 here or pull it from the bazaar repository.

Love and Communication

For the Google Summer of Code, Vytas Liuolia wrote the (very much needed) guniqueapp library; just a small recap: libguniqueapp allows the creation of single instance applications, that is applications that gets instanced once and each subsequent instance just quits – or send a command to the currently running instance.

Libguniqueapp has two available backends: D-Bus, as default, and bacon (a Un*x socket living in /tmp and used to send and receive commands). After reading about guniqueapp on desktop-devel-list, I began hacking on it in order to add a new backend, using X itself as an IPC mechanism.

Single instance applications are used on the desktop (Gedit, Mozilla, Epiphany, Evince – the list goes on), but are very interesting for an embedded device because of the the memory and/or screen real estate limitations. On the Maemo platform, for instance, this issue has been solved by having each application behave as a D-Bus service: each time an application is launched a new object on the bus is created and subsequent instances just abort. Not every embedded platform uses (or can use) D-Bus, though, hence the need for anothe IPC mechanism – like the Xlibs-based backend.

In the process of adding this new backend I’ve accidentally broken the whole guniqueapp codebase; I know, I’m really sloppy at the times. Reassembling the pieces together using GTK+ coding style (which, even though it uses the evil 2-spaces indentation from hell, I actually prefer using when programming using GObject/GTK-based stuff) and clearly hiding the backend stuff under the carpet, something else came out of it – GtkUnique.

GtkUnique is pretty much similar to guniqueapp, except that:

  • the backend implementations have been more cleanly separated and hidden in helper libraries;
  • there’s an Xlibs-based backend, which is preferred right after the D-Bus backend;
  • the IPC channel is bidirectional; that is: the message sent from a second instance to the first instance of the application has a return code, in case the operation that has been requested failed;
  • the D-Bus backend has been changed: the name of the application is used as the object on the bus, so you don’t have awkward stuff like org.gnome.GUniqueApp.YourApp but something a bit more friendly like tld.your-company.YourApp;
  • also in the D-Bus backend, the SendMessage message has been changed: it now accepts a stringified command, which is the “nick” value of the GtkUniqueCommand enum object; this way you can send commands like activate or new instead of integers on the wire;
  • the GtkUniqueApp object keeps track of the top-level windows of the application;
  • I’ve added API documentation using gtk-doc;
  • Perl and Python bindings are in the works;

You may think of GtkUnique as a fork of guniqueapp; really, it’s more of an experiment I wrote to get more aquainted with Xlibs (for instance: now I learned the hard way that you must remember to use XSelectInput() on a window to get the PropertyNotify events) and D-Bus programming. I intend to use GtkUnique inside the next release of the Dictionary and inside another project of mine, so I’ll keep on working on it.

If you want to play with it, just pull the bazaar repository from here:

  main:  bzr branch http://o-hand.com/~ebassi/bzr/gtkunique
  perl bindings: bzr branch http://o-hand.com/~ebassi/bzr/gtkunique-perl

and there’s a tarball available here

Note on the library: the libbacon-like backend is broken at the moment, as I’m still playing with it.

Note on the bindings: I’ll add the branch for the python bindings as soon as I have them in a buildable state. The Perl bindings are very rough at the moment – the make test phase fails and while you can send a message from a Perl application to a C application sharing the same name, you can’t do the opposite.

Special Delivery

I almost forgot – this should tell you how bad a maintainer I am ;-) – but Lennart’s blog reminded me: the ringchart code hit Baobab HEAD:

Baobab Ringchart

The ringchart view is really nice – even though I still very much like the treemap – but the real improvements are in Baobab’s user interface, which got streamlined and made simpler. Kudos to both Fabio Marzocca, Paolo Borelli and to all the people at Igalia who worked really hard in order to make the next stable release of Baobab rock.

I did not package a gnome-utils tarball in time for 2.17.1, as I’m still working on my development tree for both the dictionary and the screenshot tool; but since I got a couple of bug fixes (backported to the stable branch) I plan to do a 2.16.2 release this weekend and a 2.17.1 before the end of the month. In the meantime: grab a snapshot from CVS and test away!

Rainbows and Pots of Gold

Of docked windows, bugs and the Dictionary applet

One of the two major UI issues for the new Dictionary was the absence of the speller. Since that has been somewhat fixed, even if it still lacks some polish, I decided to address the other, that is the fact that the Dictionary applet uses a docked window instead of a full window.

The rationale for having a docked window instead of a floating one was that a docked window is alwas at the same place, linked to the applet, so if you want to check a word you can’t possibily “lose” the Dictionary and have to cycle through the window or workspaces list – which is the whole point of having the applet on a panel. If you want a “fire and forget” Dictionary you can always create a launcher on you panel and click on it.

One problem with this rationale is that the dictionaries usually return preformatted text, which is understandable – they should work on ANSI terminals too; but this creates a dilemma: should we remove the formatting from the text, allowing the text view widget to reflow its content without changing the size of the window? Or should we keep the formatting and resize the window?

Docked window should not be resized by the user; I don’t resize the clock applet’s drop-down, or the drawer applet, or any menu: I expect them to change their size according to their content. So, if we want to avoid what could be perceived as a regression by some users and keep the formatting of the dictionary entries, we must resize the window according to its content whenever is possible.

Here comes the bug:

Neat Bug

I haven’t been able to hit, let alone reproduce, this bug until a couple of days ago. Actually, I tried again with 2.14.0 and I could not hit it, so I think the issue is much more weird that I’ve thought :-P. Anyway: if you exposed the definition window before searching something, the window would not be resized. The actual fix took less than ten minutes (writing, compiling, adding the stock applet to the panel, killing the applet, launching the newly compiled applet from terminal and hijacking the factory included) and consisted in a couple of lines.

I’ve closed both reports, essentially because inside all code paths that lead to the visualization of the window now take care of checking its size against its content. If you hit this weird bug again with HEAD file a bug about it, but please, please avoid asking that the window should be resizable. The definition window should just work; if it does require the user to change it, it’s a bug.

Of side bars, widgets and UI changes

In related news, I’ve finally been able to spend some time updating Dictionary’s UI; the Speller widget is now embedded into a real side bar (like the one Evince and Totem use, albeit I used my own code), and there’s also a list showing the databases available on the dictionary source used; if you double click on a database, the following queries will be made against that database only (the setting is not permanent: you’ll have to update the source definition for this to happen).

Available databases

Still, the time I planned to spend and the features I intended to add to the Dictionary (and the rest of gnome-utils) are way below par, as you can see on gnome-utils roadmap. I can mostly blame moving to London and the wedding, but the thruth is that after the feat of rewriting the entire Dictionary (backend, main frontend and applet) in three months I felt a little bit burned out. The real upside, though, is that I can still hack new features like these without spending too much time (the sidebar and the database chooser are the result of 12 hours of hacking, after two months of not touching the code base except for the occasional bug fixing) thinking: “what was I thinking when I wrote this code” (except for the occasional: “hrm, what was I drinking before writing this code”); this means that the rewrite turned out pretty good: compare to adding the docked window inside the applet, a minor feature that required rewriting the entire thing.

GUADEC/Back

I’m back to London after the really amazing days in Vilanova. This year’s GUADEC has been really amazing: lots of interesting talks and great people to meet; there definitely was a great energy in the air. Kudos to everyone involved in the creation and management of this great event: you really rock the world of GNOME.

I’ve put online the slides from my talk, if anyone wants to check them out: just PNGs, so you loose all the Clutter sexyness. I’ve also put on flickr the photos I took with my really crappy mobile phone.

GUADEC/Request

If there are any liferea developers at GUADEC, I’d like to have a few words about the key bindings used in your application – specifically why did you choose Ctrl+N for “go to new item” and why Ctrl+W doesn’t close the window.

Please, don’t let me patch your application in order to behave sanely.

You can easily recognise me: I’m the one hopelessly trying to read new items using Ctrl+] and trying to close the window using Ctrl+W.

GUADEC/Day 1

The OH Gang arrived yesterday at GUADEC – just in time for my talk. I think that the tutorial went well – Clutter worked out of the box on the VGA port, which was quite a surprise. About Clutter: it was fun to see Jeff use it for his presenytation too. I’ve met with many interesting people – just hope to remember their names, though: I’m terrible with name memory; so, if OI see you and I’ll look desperatly at your name tag even if we already introduced ourselves, please bear with me.

GUADEC this year is awesome, and kudos goes to Quim and all the wonderful staff that made this magic possible.

A Sort of Homecoming

Sci-fi – I’ve ordered on Play.com the DVD box of the first (and last) season of Firefly and I think it really was a great show, where Joss Whedon really tried to follow the path of Isaac Asimov, and show that sci-fi it’s not a genre but a device of storytelling, encapsulating a genre; too bad some clueless executives shot it down. I also bought the 2003 mini and the first season DVD box of Battlestar Galactica, and I just can’t express how amazing it is.

GUADEC – Getting everything ready and packed for going to Vilanova. I prepared the slides for my talk (sunday 25th, 18:00) about (guess what?) recent files; it’s a tutorial, so I’ve also prepeared some bits and pieces of code to show how to add places/bookmarks and recent files support, and to port from EggRecent to GtkRecent. After a year, from Stuttgart to Vilanova, from a GUADEC to another.

Security – Thanks to Tim for the reminder about security and laptops; another sane advice is do not put sensitive data on a laptop in the first place. On my laptop I didn’t create a partition for my data, so I can’t use Tim’s advice unless I resize everything – hence, I’ll leave everything on an encrypted volume at home. :-)

Life – The apartment is almost done – only a couple of items missing: a sofa-bed and a coffee table for the living room; I hope to have everything in place after the wedding. From the 3rd of July to the 13th I’m going back in Italy with Marta, in order to get everything ready before and after the ceremony.

Here I Dreamt I Was An Architect

Today I finally did find time to work on gnome-utils. I applied a whole slew of patches that sit in my development trunk for almost a couple of months now, and that I tested locally. The first thing that went is is the speller widget for Dictionary; it’s still rough on the list of words it displays (no separation between results from different databases), but it works nicely: when you activate a row in the list it’ll only search on the database the word was found in. The spinner is gone – replaced by a progress bar in the bottom right of the status bar; still, the Dictionary looks like a web browser in my opinion. Maybe a more radical approach in the design of the UI is needed, or maybe I’m definitely on crack and this is how a dictionary application should really look like.

Dictionary 2.15.3

By the way, since 2.15.0 the “rounded window corners without alpha channel” bug has been fixed in the Screenshot application. I don’t remember if I wrote it in the announcements of the last release.

Thanks to Lin Ma, the System Log Viewer should Just Work(tm) on Solaris; also, thanks to Joe Marcus Clarke, many of the crashers on 64bit platforms should have been fixed. Kudos to both of them. The plan was to refactor and update the code-base, but I’m afraid it’ll have to wait.

Between GUADEC and wedding, I hope to find time to hack on System Log Viewer and Screenshot. Anyway, tomorrow I’m going to release gnome-utils 2.15.3, in time for the GNOME 2.15.3 dealine.