My favourite Empathy feature no-one knows about

Picture the scene. You’re painstakingly composing a lengthy message…

…when you manage to close the tab by accident (maybe you hit Ctrl-W after too many years using a terminal? or maybe you thought your browser was focused?). You hammer your keyboard in frustration: your beautiful prose is gone forever. But wait! What’s this lurking in the Tabs menu?

Not only does it reopen the tab you just closed, but the message you were composing is remembered, too. Crisis averted!

The keyboard shortcut is Shift-Ctrl-T, just like in many web browsers (which inspired this feature). As a secret bonus feature, the keyboard shortcut works in the contact list, too, to rescue you when you’ve closed the very last tab by accident. Empathy remembers the last few tabs, not just the most recent.

Of course, if you don’t know the super-secret contact list shortcut, you can go find the contact in your contact list again: Empathy should still have remembered the message you were typing. (Right now it doesn’t persist across sessions; a patch to add that would be most welcome!)

Undo Close Tab has been around for a while; remembering the half-written message was added in Empathy 3.1.2, so it’s coming soon to a GNOME 3.2 near you! Thanks, Jonny.

A Tale of Two Conferences

I spent the week in humid, rainy Berlin for the Desktop Summit. I particularly enjoyed Sunday’s keynotes by Claire Rowland and Nick Richards, not to mention the many great talks and discussions. It’s always fun to catch up with old friends (not to mention my coworkers at Collabora, very few of whom I see regularly), and to meet some new (to me, at least) faces, including João Paulo, whose Summer of Code project—implementing OTR in Telepathy—I have the pleasure of mentoring. I gave a talk of my very own, which apparently is one of the few videos available so far. I haven’t dared watch it yet. 😉 I hope to make the promised new release of Bustle this coming week.

Later in the week, the BoFs on D-Bus and on GNOME IM integration were both very productive. Hylke and Andreas’s input was very useful in the latter, as was the presence of David and George of KDE-Telepathy fame: they’re solving (and hitting) a lot of the same issues as are found in GNOME, so we had some true cross-desktop pooling of ideas and solutions. Thanks to everyone!

The passport queue at Stansted

The journey back on Friday evening was smooth—at least until we hit Stansted, where of course there was an inexplicable zoo of thousands of travellers queueing for passport control. (Not pictured: the thousands more behind me.) And of course, what better to do after a week at a conference than to attend another two-day hackathon at Homerton

Desktop Summit and CamHac Lanyards

CamHac is the first Haskell hackathon I’ve attended. It’s a very welcoming community, full of interesting people and projects. I swapped Vim tips, shoulder-surfed some of the internals of GHCi, chatted about open data and web server frameworks with some Silk folks, learnt about the internals of fast output stream libraries, and otherwise hacked on a long-dormant GObject introspection-based binding generator. It took a while for me to catch up with Daf’s work to date; I warmed up by generating code for enums and flags, and then started reworking the code generator to use haskell-src-exts’s AST and pretty-printer. Interesting stuff.

Shaving a yak with an angle bracket

Today I wrote an XMPP console for Telepathy, in the form of a little Gabble plugin plus a really terrible Gtk+ interface that lets you send an IQ and see the result, syntax-highlighted—mostly in bright pink—by GtkSourceView. Wocky, gobject-introspection and GtkGrid.attach_next_to are all great. In the highly unlikely event that XMPP consoles are something that interest you, and that the lack of one has been dissuading you from embracing Empathy, I hope this meets with your approval.

This has mostly been a diversion from debugging some weird alias, roster and presence interactions between Gabble and Prosody, which I still haven’t tracked down. But hey, the angle brackets look nicer now!

Sojourner help wanted for MeeGo Conference SF

A few months back, Topi Santakivi updated Sojourner for the MeeGo Summit in Tampere. Andrew Flegg wonders about an update for MeeGo Conference San Francisco 2011, which I’m sadly not attending. The schedule’s available as a web page. I had a quick poke around for a version in a more machine-readable format—ideally PentaBarf XML, which Sojourner understands, but even something that could be converted to that—and couldn’t see anything obvious.

Dear reader, would you happen to know of such a machine-readable schedule, and would you like to send a merge request updating Sojourner to show it?

Empathy chat room improvements

Folks who’ve tried using Empathy for IRC will have found the experience a bit lacking. While some of this is due to Empathy itself, many of the problems are due to Idle, the Telepathy backend for IRC, being sorely in need of love and caring. Happily, Debarshi Ray has taken it under his wing. Most visibly, he’s implemented the ContactInfo interface, which allows Telepathy UIs to show WHOIS information. I threw together a few patches for Empathy to take advantage of this information:

Contact information for ‘wjt’ on Freenode, showing other channels, away message, and other IRC-specific details
Please ignore the ‘missing image’ icon!

Sadly, the “Channels” field is not very useful on most major networks, like Freenode, since—by default—you can only see the rooms that both you and the contact are in. In the past, on IRC, that window was positively anaemic, showing only the first three lines. Now it’s full of information, and could do with some advice from designer types: how can we show all the information described in his blog post without the dialog becoming even more a massive grid of words?

Rishi’s also fixed up many less obvious annoyances in Idle, like making it sending pings to keep otherwise-idle (ahem) connections alive. It’s great to have him on board!

Stepping away from IRC, I’ve recently been using XMPP chat rooms more, and noticed a subtle improvement implemented by Chandni: Empathy now shows per-user typing notifications in the user list. Now I wish this were possible on IRC too, or that more channels would move to XMPP: it’s really useful information to have, particularly in smallish rooms.

Termite Misdirection

I really hate how submitting or updating a bug on Bugzilla leaves you at post_bug.cgi or process_bug.cgi, rather than bouncing you back to a URL that actually identifies the bug in question. So, I wrote a Greasemonkey userscript named Termite Misdirection to detect this situation and fix the URL. If your browser supports the HTML5 history API, it should be mostly transparent; if not, then you’ll see the page being reloaded, and you’ll lose the “Changes submitted” etc. message.

I use this Chromium; I’m told it works in Firefox too. (Yes, I know I should submit a patch to Bugzilla itself to make this unnecessary, but that would be more work than 16 lines of Javascript and wouldn’t work with all the existing Bugzilla instances I use every day.)

eMusic in Banshee

I’ve been an eMusic customer for many years, and I’m pretty happy with it. Banshee comes with a plugin—courtesy of Eitan—to help download entire albums from eMusic without using their own downloader application. But you have to go search in your browser, and then hope the necessary MIME type handlers are set up to pass the .emx file eMusic gives you to Banshee, and also have remembered to enable the plugin.

Having enjoyed the notorious Amazon store integration, I thought I’d try my hand at something similar for eMusic. Here’s a quick demo video of downloading a couple of albums: one free, one not. Not shown in the video: playing track previews inside Banshee, and downloading invididual tracks.

I’m pleased to say that I wrote approximately no code (which is good, because I don’t really speak C♯): it’s derived from the Amazon store plugin, with most of the code removed. What remains is in a branch on fd.o; I’ve updated bgo#623828 with a link if anyone fancies reviewing this. (I am very tempted to set up a personal cheese and wine fund.)

RXMPP: an R library for XMPP based on Wocky

My friend David Lawrence Miller likes the internet, and also likes statistics. (He has many other admirable qualities, but these are the two most pertinent to this bulletin.) He spends some of his days writing programs in R, which he then runs on one of a number of servers. He wanted his R programs to send him messages over Google Talk to report their progress.

Naturally, I suggested he use Wocky, everyone’s favourite GObject-flavoured XMPP library. (Do not confuse.) And lo! he’s started RXMPP, a simple R library for sending IMs. He’s developing on Mac OS X; it should work on Linux and Windows just as well, though.

(As an aside: I wonder if anyone would be interested in maintaining a Wocky framework for OS X? Currently one has to install glib via MacPorts, and then build Wocky from Git, to hack on RXMPP on OS X.)

Sojourner 0.2: coloured and communitized

Another week, another release of Sojourner; this time in glorious 32-bit colour, and featuring its first community contribution!

Screenshot of Sojourner's favourites window Screenshot of Sojourner's event details page

The eagle-eyed reader will have noticed that, in the favourite talks in the screenshot above, Andrew‘s Django talk sadly clashes with Raúl‘s Folks talk. I hadn’t noticed, until Joaquim Rocha sent patches adding a button that shows which of your favourites clash with the event you’re viewing. Now I have a dilemma on my hands… Joaquim also cleaned up some of my less-beautiful code. Thank you!

The event lists are now easier to skim-read, with subheaders for the day and coloured swatches representing the track the talk is part of. I don’t know if in practice people will actually associate the colours with tracks, but I do think than the pastel stripe at the left-hand side makes the list easier on the eye. I initially wanted to re-use the colours on the official schedule, but didn’t really want to hardcode a massive list of colours (and the schedule XML doesn’t include them), so they’re generated based on a hash of the track name. (Thanks to Sjoerd Simons for the “vary H, fix S and V” tip for generating a palette.)

The package should be available from extras-testing by the time you read this.

Sojourner: a(nother) FOSDEM schedule app for the N900

Last year, I threw together a primitive FOSDEM schedule application for the N900. A year later—just in time for FOSDEM 2011, which I am attending!—it’s back, with more polish and a catchier name: Sojourner.

A screenshot of Sojourner's main window A screenshot of Sojourner's single event view

New since last time around:

  • You can refresh the schedule from within the app;
  • It works in portrait mode;
  • It generally looks a bit better, with margins and button sizes matching other Fremantle applications more closely;
  • It has, yunno, icons and packaging.

Most of those fall firmly into the “well of course it should be like that”. I told you it was primitive the first time around. 🙂 There are a few more screenshots on my Sojourner page, or you can install it from Fremantle Extras. It’s currently in extras-testing; please feel free to leave feedback there or here. The wiki on Gitorious has a laundry list of suggestions for improvements, as well as a few buglets I’m aware of. Of course, if you want to get involved, I’d be delighted. It’s written in Python, using Gtk+ and Hildon. Non-code-wise, the artwork could definitely use some love (I just threw it together in a few minutes in the Gimp) and some more careful thought about the user experience might be nice.