Emphatic Epiphany
July 19, 2007 – 7:00 pmUpdate: I’ve updated the extension to a newer version of Empathy (0.12+), you can read about it here.
There’s lots of exciting things going on in Telepathy and Empathy projects. Telepathy has been quite stable and usable for some time now, but since it’s really a backend service, it wasn’t very visible on the desktop, and the Empathy client (a fork of Gossip) is still mainly used as a standalone client.
Better way to use Empathy is actually to use the provided API and widgets and incorporate them into other applications and desktop components, so that the instant communication (both text-based and audio/video) really becomes a first-class object in GNOME and free desktops in general. There is some work already on the way - Soylent can use contact information provided by Telepathy to display information about the contacts, and there is a Google SoC project to enable Jokosher to use audio calls (using Telepathy) as Jokosher instruments.
Empathy provides a rich set of reusable components which can be used to easily incorporate im-related stuff into other application, and consists of two libraries, libempathy, which is the core API not dependant on GNOME or GTK+ (glib is required, though), and libempathy-gtk, a set of readily-available widget for things such as contact lists, account creation, chat windows, etc. Empathy is written in C, but one of the benefits of the Jokosher+Telepathy projects (which aims to reuse Empathy widgets) is that we now have Python bindings for Empathy! It’s a work in progress and some things are missing, but it is already usable.
To show how easy it is to integrate IM components into other application, and why it would be nice to do it in the first place, I’ve spent a couple of hours writing an Epiphany extension that allows the user to share the links on a web page with their IM contacts. Most of the time was spent figuring out how to make an Epiphany extension, and installing
the required Empathy libraries and bindings.
The result:

Hover over the interesting link and right click

Select one of your contacts

The contact gets the message with the link
The code for the extension is here. As you can see, the actual code for getting the contacts and initiating the chat is the smallest part of the extension :) The stuff is currently just a hack and needs to be cleaned up and properly packaged, which I do intend to do in the near future, by which time hopefully the pyempathy-gtk will be stable enough to sport real contact list chooser widgets instead of a hacked-up version I did here.
Update: I’ve confused Sabayon with Soylent. Thanks to cassidy for the correction


4 Responses to “Emphatic Epiphany”
This looks awesome, a very small but useful feature. I am not that familiar with the bindings, I will have a look at them though, but it would be good to maybe display a little more information on the contact, maybe a display pic or something. In fact, maybe it would be a good idea to develop a “select user” widget, so that this process is consistent across all applications.
By Jon on Jul 20, 2007