For too long on the Free Software desktop there has been a systray that is simply out of control. It provides for an arbitrary window with arbitrary behavior that developers have used arbitrarily. This provides a difficult interface for users as they don't know what to expect. It provides a difficult situation for applications as there is no way that they can give the user a good experience as there are no standards to follow. And it makes the whole support system for software more difficult through documentation and long explanations of how to use the computer.

Enough bitching. We're going to fix it.

We're starting with the KDE Status Notifier spec. It has been proposed to XDG and is currently used inside of KDE. It provides a DBus based interface for applications to advertise systray style information over DBus thus eliminating the need for XEmbed. The way that the Notifier Item spec is written it's designed to make the application expose information independent of the visualization, and we'll be one visualization of this data. A restricted visualization specifically focused on panels. We're going to have each application represented by a menu.

So with every application being a menu, and the panel knowing this and being able to assume it, then the whole systray can be a menu bar. This makes it easy to browse application's menus, find what you want, and work with it. It also improves keyboard navigation and increases the accessibility. Menus are a nice mix between simplicity and expandability as they're easy to use and yet provide a way for applications to provide a rich set of functionality.

To do all of this, and make it easy for application developers to implement, we've built a small convenience library. That library is libappindicator. Basically it takes an icon and a menu and magically sends it over DBus and puts it in the panel for you. No fuss. It will also handle the cases where you're on KDE and want to use the older KDE Status Notifier API. Or, even the old XEmbed way of doing things. We've tried to make it pretty easy for application developers:

/* Indicator */
indicator = app_indicator_new ("example-simple-client", /* ID   */
                               "simple-client-icon",    /* Icon */
                               APP_INDICATOR_CATEGORY_APPLICATION_STATUS);

indicator_menu = gtk_ui_manager_get_widget (uim, "/ui/IndicatorPopup");

app_indicator_set_status (indicator, APP_INDICATOR_STATUS_ACTIVE);
app_indicator_set_attention_icon (indicator, "simple-client-att-icon");
app_indicator_set_menu (indicator, GTK_MENU (indicator_menu));

Some of this stuff is, unsurprisingly, not yet complete. The menu support basically only works with labels today, and the fallbacks aren't yet in place for the legacy protocols. I promise I'm working on it. We'll be getting better menu support here probably this week and then I'll start working on the legacy support. I believe that there's enough here to get started, and to start understanding what we're thinking.

This post is getting long, let me just finish up with some links:

  • Indicator Application Launchpad page -- this is where all the code and bugs are. Feel free to branch and do what ever you want with it.
  • Documentation Wiki -- To understand what we're doing and how to port applications we've tried to put up some documentation. We'll continue to add as we get language bindings up and running here shortly.
  • PPA for Karmic -- We've backported the modules required so you can develop and play with what we're doing today. There's also a preliminary patch to Rhythmbox that you can look at, which will, of course, be submitted upstream when it's cleaned up.
  • Ubuntu Developer Week -- I'll be talking about this there, if you want to come and ask questions or just lurk.


posted Dec 16, 2009 | permanent link