Posts Tagged ‘collabora’

Megaphone Applet

Thursday, August 9th, 2007

Today, I finished hacking together a ‘person’ applet, using – of course – Telepathy and the excellent Empathy’s libraries created by Xavier Claessens.

Xavier Claessens

While I’m at it, you can read more on telepathy and empathy in my GUADEC 2007 talk (also see my pictures on flickr).

Here’s what it looks like:

Megaphone Applet screenshot

The right-hand panel contains a number of megaphone applet instances, one for each contact I often talk to. If I click on the avatar (or the generic contact icon) it creates a text chat. The beauty of Telepathy is that the text chat will be handled by my favorite text chatting application, in this case Empathy itself, but it could be konqueror or whatever other program capable of handling text chats.

The first time the applet is added, you can choose a contact to be displayed. The contact chooser re-uses the empathy contact list as found in libempathy-gtk. Simply find your contact in the list, click ok and you’re set.

The applet also offers an ‘Information’ dialog, taken again from libempathy-gtk that allows you to view and edit the contact vcard, and edit the groups to which it belongs.

And amazingly, the applet only has 570 lines of C code and that includes the gobject and applet boilerplate…

In completely unrelated and old news, we got our traditional gourmet restaurant with vincent, xavier and cédric at Birmingham. Delightful!

Gourmet Restaurant

Vincent certainly seems to enjoy the moment !

DBus Testing Framework

Monday, March 6th, 2006

Hello dbus coders out here, i’m pleased to announce the first release of a dbus testing framework.

What is it ?

You may know that testing dbus services or debugging dbus clients is not always easy since it involves creating services and wiring up things you don’t really want to do in a test script.

This framework (quite a buzzword) allows you to easily setup and run dbus services and clients in a linear python script.

Originally written for the telepathy framework (a inter process communication framework aiming to bring conversation as first-class desktop citizen) (don’t laugh rob), an heavy consumer of dbus stuff, and sponsored by Collabora.

Libnotify Sample

Just to have a teaser, here is a libnotify test sample, it opens a notification bubble and then close it and checks that the closing reason and id is correct:

self["notif"] = ("org.freedesktop.Notifications",
"/org/freedesktop/Notifications",
"org.freedesktop.Notifications")

id = self["notif"]["Notify"].call("notifname", 0, "", "title", "content",[],{}, 0)

self["notif"]["NotificationClosed"].listen()
self["notif"]["CloseNotification"].call(id)
results = self["notif"]["NotificationClosed"].wait()

assert results[0] == id

Documentation and download

You can access the full explanation and tutorial and documentation on this page. For the moment the framework is a single python file available here and you can download the sample tests file to get an idea of what kind of scripts can be written.