GNOME Bugzilla – Bug 470465
Multiple applets documentation nonexistant
Last modified: 2020-03-16 22:01:50 UTC
Documentation Section: ?? " FIXME: write " Correct version: I don't know. That's what I'd like to find out. Help! Other information: Read it and weep: http://library.gnome.org/devel/panel-applet/unstable/multi-applets.html
Having this bug assigned to "gnome-user-docs-maint@gnome.bugs" doesn't sound right to me, but that's the default owner for documentation bugs. I assume you guys know where to reassign this...
To give some context, the problem I'm trying to solve is this one: https://savannah.nongnu.org/bugs/?15606 Following the GNOME Applets tutorial at http://www.gnome.org/projects/ORBit2/appletstutorial.html results in an applet that can only be added once. I want to know how to enable several instances of my applet to be active at once.
If I understand the bug correctly, you're talking about the libpanel-applet doc. It should just work, though. You don't have to do anything special to have multiple applets. You can look at the applets in gnome-panel or gnome-applets module to see how they're implemented.
Yes, http://library.gnome.org/devel/panel-applet/unstable/multi-applets.html should be for libpanel-applet. The problem is I have an applet (http://bubblemon.nongnu.org) for which it doesn't just work. Looking at some other applet (I think it was the Network Manager applet) it's doing something with instances that I'm not, and that I don't understand. I doubt that the applet from the first chapter of that tutorial (which *does* exist) could be run in several instances either, since it seems to be doing exactly what I'm doing (but not what the Network Manager applet is doing). Anyway, thanks for redirecting the bug report! Looking forward to hearing from the libpanel-applet guys :-).
I'm the libpanel-applet guy too :-) I don't have enough time to look at all this right now, though. Your best chance is to try and play with all this and see what's wrong. Just look at the code of a really small applet, like the notification area of the fish (in gnome-panel). Those ones work as expected.
OK, reverse engineering it is then... If you happen to stumble upon any docs for GNOME's (GTK+'s? somebody else's?) class / instance system, a link here would be peachy. Regards //Johan
The trick is not to use any global or static variables in your code. I de-globalized Bubblemon 2.0.11 and Bubblemon can now be run in several instances.