On 24 October 2011 23:16, Alex Cornejo <[email protected]> wrote: > 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 > > _______________________________________________ > Mailing list: https://launchpad.net/~ayatana-dev > Post to : [email protected] > Unsubscribe : https://launchpad.net/~ayatana-dev > More help : https://help.launchpad.net/ListHelp > Hello,
As of now there is no signal to indicate that the menu was triggered. Instead, you're expected to pass a working menu on during initialisation and let it use that. This has caused problems in other implementations, you might want to check how nm-applet (Network Manager's applet) and indicator-power solved this. The bug report requesting the signal you asked about can be found at <https://launchpad.net/bugs/522152>, if you're interested in keeping track of it. Regards, -- Sense Egbert Hofstede http://www.sensehofstede.nl/ _______________________________________________ Mailing list: https://launchpad.net/~ayatana-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~ayatana-dev More help : https://help.launchpad.net/ListHelp

