← Back to team overview

unity-dev team mailing list archive

[Ayatana-dev] statusicon -> AppIndicator (popup-menu signal)

 

Hi all,

I am porting an application from StatusIcon to use AppIndicator. This
particular app uses RandR extension to let the user manage multiple
screens, resolutions and layouts. Right now I generate the menu on the
fly when I get the popup-menu signal, which works flawlessly. This
doesn't seem to be possible with AppIndicator, could someone with
experience in AppIndicator with it could suggest me a good
alternative?

Another "clean" alternative, would be to somehow try to listen for
changes in the devices which are plugged in, perhaps using some dbus
message which is generated when a second monitor is plugged in
(although this is probably handled by udev, and I do not know if dbus
currently generates events for this). I am not even sure that this is
possible.

A simple, yet horrible solution would be to simply regenerate the menu
every X seconds, using a timeout. However, this hack is to dirty for
me to even consider.

If at all possible, I would love to just hook to some signal that
AppIndicator generates (or should generate) whenever the user first
clicks on one of the app indicators and the menu needs to be produced.
Looking through the documentation, I am not sure this is possible
either, please advise how to proceed. I asked this question several
times in IRC and got no reply, perhaps I'll get better luck here.

Cheers,

Alex



Follow ups