I can't really understand how xulrunner preferences work.
I have simple xulrunner application:
/testapp
--/chrome
----/testapp
------start.html
----chrome.manifest
--/defaults
----/preferences
------prefs.js
--application.ini
My first entry in prefs.js is:
pref("toolkit.defaultChromeURI",
"chrome://testapp/content/start.html");
When I run the app, I see a xulrunner window with my start.html inside.
So far so good.
I've played a little with my preferences, then. I had those warnings
messages when I tried to use external protocol handlers. So I add:
pref("network.protocol-handler.warn-external.mailto", false);
pref("network.protocol-handler.warn-external.http", false);
...to my prefs.js. It definitely worked. Then I wanted to start my
window maximized. Just for a start I added this snippet I found
somewhere:
pref("toolkit.defaultChromeFeatures", "chrome,resizable=no,dialog=no");
This definitely didn't work. I've tried also a few other printer
settings (like "pref("print.print_headercenter", "whatever");");
without any success.
Then I've noticed all.js file in xulrunner/greprefs subfolder. I've
played with my favourite setting
"network.protocol-handler.warn-external.http" - works. But I've also
noticed settings like "browser.anchor_color" or
"browser.underline_anchors" which, though set, don't affect my app at
all (i.e. links are white and not underscored).
So how come some settings works, and some don't affect anything? Alike
in my settings file and global settings (I guess)?
Thanks,
Jan
I don't know about the other stuff, but the link preferences will not
affect your HTML file because it is loaded as chrome - those preferences
only apply to content.
--
James Ross <sil...@warwickcompsoc.co.uk>
ChatZilla Developer
> I don't know about the other stuff, but the link preferences will not
> affect your HTML file because it is loaded as chrome - those preferences
> only apply to content.
...so. How to load html as a content?:) Perhaps those "maximized
window" preferences will work then, too.
I can live without link's colors and underlining, I can css-style them
or whatever. But I am really concerned with printer settings (I want to
be able to print without headers or footers) and window settings
(maximize / fulscreen).
Jan
Jan
Load an XUL file with <browser type="content"> (or <iframe
type="content">) in, then load your HTML in it. I wouldn't bother,
though, and instead just style the links yourself.
Can't help with the printing problem, though.
Jan