Skip to content

Ubuntu Indicator plugin for Pidgin

I’ve been a loyal pidgin user for a long time, and for the last couple of years it’s sat somewhat uncomfortably on the Ubuntu desktop. Obviously, Empathy became the default IM client a while back, but the more troublesome part, for me, has been Unity dropping support for the well established system tray icon specification in favour of their own Application Indicators. Ignoring the relative merits of the standards, and the questionable claim that you can unilaterally deprecate a widely used standard, Ubuntu has been good at providing indicator replacements for all the tray icons I care about, with one notable exception – Pidgin. Rather than providing a pidgin icon, they instead provided integration with the central messaging indicator. While this is a fine aspiration, I find the messaging indicator a very poor replacement – it doesn’t offer reasonable behaviour for showing and hiding pidgin and has problems dismissing new message notifications.

Initially, it was possible to turn on the system tray compatibility function in Unity with a simple dconf setting, but in 13.04, this was changed so that it would only work for java, and nothing else. In turn, this led to the creation of ppas for 13.04 and 13.10 to provide patched versions of Unity with the general purpose system tray restored (a one line change, apparently). I’ve been running with that for a while, but I didn’t want to swim upstream on this issue forever, so I decided to write a pidgin plugin that provides a proper indicator, with the same menu and behaviour as the tray icon.

It turned out to be an interesting exercise – creating indicators is extremely simple – all credit where it’s due – with the main challenge being building the menu without reinventing a wheel that’s already present inside pidgin. The pidgin tray icon (docklet is the internal name) is not a plugin, although there is a partial concept of different providers. Unfortunately, the interface can’t be used to drive an indicator as it assumes it can show the menu itself, while indicators require the menu be shown by the indicator. Ultimately, I had to copy the docklet code into my plugin to make the necessary modifications.

It would be possible to modify the docklet interface in pidgin to allow for an indicator provider with minimal impact on the existing providers, but I wanted to offer a working solution without requiring a newer version of pidgin, never mind the complexities of feeding changes upstream, etc. But, there’s an aspirational project there.

So, without further ado, I’d like to offer to all the stubborn people who want pidgin to work they way it always used to in Unity.

At some point I’ll get around to producing a deb for it, but just source for now.

Enjoy!

{ 5 } Comments

  1. Dan | 22nd January 2014 at 05:24 | Permalink

    Hi Philip

    I am Dan and was excited to read you could add an updated AppIndicator for pidgin.

    Perhaps you know the very useful program GBirthday. Jérôme Lafréchoux looks for someone to help regarding an AppIndicator as he has no skills for that:
    sourceforge.net/p/gbirthday/feature-requests/1/
    So far nobody could be found who has the knowledge to help. And because the Unity systray whitelist was removed GBirthday will be not functional anymore with the next LTS Ubuntu 14.04 and I did not find a substitution for it.

    Could you help with this?
    Any support would be very much appreciated.

    Warm regards,

    Dan

  2. Philip Langdale | 22nd January 2014 at 19:58 | Permalink

    Hi Dan,

    Unfortunately, I really don’t have the time to work on another project right now. Conceptually, this is pretty simple work – the main thing is that you can’t build the menu when the user clicks on the icon – you need to build the menu ahead of time and attach it.

    If the menu changes to reflect the state of the program, then you have to set up callbacks to update the menu object as state changes.

    The icon situation looks like it’s a non-issue – this app only shows one icon, so it can just be specified by full path.

  3. Dan | 22nd January 2014 at 21:38 | Permalink

    Hi Philip,
    Thanks for your quick reply! It is a pity you don’t have time for this. As it seems pretty easy, I hope somebody else with some skills (I don’t have) will read this and give a helping hand. This would be awesome.
    Or do you know anybody that could help out?
    Thanks for your tips anyway!
    Cheers, Dan

  4. zImage | 25th January 2014 at 05:02 | Permalink

    Thank you so much!

  5. dmitry | 12th August 2014 at 01:03 | Permalink

    thank you!
    please write a plugin to display the number of unread messages in unity launcher panel. =)

Post a Comment

Your email is never published nor shared. Required fields are marked *