google
yahoo
bing

Twitter and Deskbar : Revived

A good while ago Phil Wilson wrote a very simple deskbar-applet backend to post updates to Twitter. I always thought it was a very cool idea, and now that I have jumped on the micro-blogging-band-wagon, even more cool.

Sadly it does not work in the new Deskbar API. So what will a hacker do? I was already in desparate needd for some quick bang-for-the-buck because hacking on xesam-glib can sometimes feel like working in an ivory tower (listen to the monkey whine…).

Without further ado

Screenshot of deskbar's new twitter handler in action

Of course if works with gnome keyring integration, async posting, and all that.

The deskbar twitter handler can be downloaded here

I will massage it a bit and submit it to deskbar trunk if it is deemed worthy. It contains a few tricks that might be handy for other deskbar backends too. Namely a generic urllib.URLopener that integrates with gnome keyring (thanks Sebastian Rittau!) and has an async open() variant that integrates with a GMainLoop.

Tags: , ,

7 Responses to “Twitter and Deskbar : Revived”

  1. David Says:

    You should take a look at the GNOME Do Twitter plugin: https://wiki.ubuntu.com/GnomeDo/Plugins/Twitter

  2. Tony Says:

    Hi,

    Great work on the handler!

    Unfortunately it’s not working for me. What version of deskbar did you write the handler for? I’m using deskbar 2.21.91

    Thanks,
    Tony

  3. Matthew Says:

    Guess I’ll hangup my Twitter plugin now.
    http://www.butterfat.net/wiki/Projects/DeskbarPlugins

  4. kamstrup Says:

    @Matthew: The Wayd plugin is definitely a cool idea. You, like a lot of other people, have made two “mistakes” that my twitter plugin does “right”.

    1) Use Gnome-keyring instead of gconf to store credentials. GConf is easier, but also insecure.

    2) The query() method of the Module is async, but Action.activate() is sync. This means that you potentially block the main loop if doing network requests in that method.

    The code I have to solve this is generic and integrates cleanly with urllib. If I get it into deskbar trunk it should be easy to apply to your Wayd handler.

  5. kamstrup Says:

    @Tony: Can you email me a stack trace or more detailed report?

  6. Matthew Says:

    @kamstrup
    I knew about the possible sync hang using the network that way, but it doesn’t get in the way enough to bother me.

    I actually didn’t think about using the keyring, which I might move over to using.

  7. Phil Wilson Says:

    Awesome! Thanks for doing the dirty work for me!

    I got a new laptop and my wifi card doesn’t work under Ubuntu, hence the lack of updates so I’m very grateful!

Leave a Reply