Neil wrote:
> Michael Vincent van Rantwijk, MultiZilla wrote:
>
>> Christian Arnold wrote:
>>
>>> function statusbarIcon(iconVisible) {
>>> var wm =
>>> Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);
>>>
>>>
>>> var type = 'navigator:browser'
>>> var enumerator = wm.getEnumerator(type);
>>> while(enumerator.hasMoreElements()) {
>>> var win = enumerator.getNext();
>>> var panel =
>>> win.document.getElementById("your-extension-statusbarpanel");
>>> panel.hidden = iconVisible;
>>> }
>>> }
>>>
>>> The XUL-Part:
>>> <checkbox id="prefstatusbarvisible" preference="statusbarvisible"
>>> label="&prefstatusbarvisible.label;" onclick="return
>>> statusbarIcon(this.checked);"/>
>>
>> Don't use code like this, but use the observer service to notify all
>> open windows.
>
> Better still, use the preference service - you are after all setting
> preferences...
Ah, now I see (I had missed this before with my sleepy eyes/head).
Thanks,
--
Michael Vincent van Rantwijk
- MultiZilla Project Team Lead
- XUL Boot Camp Staff member (ActiveState Training Partner)
- iPhone Application Developer
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners