Hi All,
Using the JavaXPCOM interfaces, I'm getting preferences using the following:
nsIServiceManager sm = moz.getServiceManager();
nsIPrefService ps = (nsIPrefService)sm.getServiceByContractID(
"@mozilla.org/preferences-service;1",
nsIPrefService.NS_IPREFSERVICE_IID);
I'm then setting my preferences by doing the following:
nsIPrefBranch prefs = ps.getBranch(null);
prefs.setIntPref("permissions.default.image", 2);
Then, I'm opening a window using a nsIWindowWatcher that I had
previously gotten:
windowWatcher.openWindow(null, "http://www.google.com/", "_top",
null, null);
This opens a window to the correct page, but it seems to be ignoring the
preferences I have set. If I do:
windowWatcher.openWindow(null, "about:config", "_top",
null, null);
My preference shows up with the correct value.
Any idea why this is happening?
Thanks,
--Chris
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding