[Project_owners] Changing contents.rdf / overlays dynamically
pete at mozdevgroup.com
Mon Jul 5 14:45:10 EDT 2004
Brian King wrote:
> I'm wondering if anyone has done something like the following?:
> - I have a bunch of UI widgets, split between different overlay files
> - I want to pick and choose which ones to use/pull in, which can be
> different in any given session.
> - The contents.rdf file that defines the overlays, when registered
> creates an overlays.rdf file in
> - Until now, I do this by hand editing contents.rdf, and
> re-registering the chrome.
> What I would like to do is:
> - Provide a GUI for choosing which widgets to appear, and the
> checkboxes would map to different overlay files.
Yo want to maintain a fixed number of different overlays so you can then
choose a specific overlay and the point to that from overlays.rdf right?
> - Modify contents.rdf, or even better directly overlays.rdf based on
> users choice, via script.
You can't modify contents.rdf because it's wrapped up in a jar. You can
modify overlays.rdf since it is just another datasource. Take a look at
the jsLib uninstall code Neil implemented and you'll see where he did that.
Take a look a the removeOverlay function.
Mozilla Software Development Solutions
More information about the Project_owners