Saturday, February 16, 2008

the unbearable slightness of seeing

Okay, so the icon isn't much. But it represents nsINotificationArea support for WebrunnerPrism under Linux (not complete by any means, but it actually shows/hides the icon and sets the tooltip, which at the very least is measurable progress). Most of the time was spent wrestling with the build system, which is about as surprising as something not very surprising. A hard-coded icon file extension in webrunner.js cost me more than a few minutes of sulking too. (And what's the deal with XPM instead of PNG?)

It uses GtkStatusIcon, which was introduced in GTK+ 2.10, but seeing as how e.g. the printing changes that went into the Firefox 3.0 nightlies also require 2.10 or later, I doubt it's much of a problem. If there's any interest in this stuff upstream, that is.

Also, I'm really happy there are XULRunner SDK nightlies. Tastes great, less building.


Matthew Gertner said...

There's a bug filed to switch from xpm to png: You're welcome to take a look.

Is there some way we can get our hands on your trayicon support for Linux?

fredrik said...

Hey Matt.

I spoke a short while to mfinkle over IRC yesterday about this. He pointed me to the XPM-to-PNG bug as well. I switched to using PNG locally, it's basically a 2 line fix from what I can tell. With the side-effect of icons actually showing up on the main Prism window (with XPM they didn't).

As the tray icon code looks right now, it's not ready for any sort of deployment (in that it doesn't work). It shows the icon, but the onNotificationAreaClick callback causes a segfault. Haven't a clue as to why.

I have every intention of sharing this upstream if it's wanted, even though it started out mostly as a "lets see if this works" kind of thing.

Matthew Gertner said...

We're light on Linux expertise so anything you can contribute is much appreciated!

fredrik said...

I'll try to pop in on IRC and discuss this a little more. I've some other little bits and bobs I've poked at as well.

Matthew Gertner said...

I'm "plasticmillion" on IRC.