Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Setting XULRunner properties programmatically
icon5.gif  Setting XULRunner properties programmatically [message #804539] Wed, 22 February 2012 18:51 Go to next message
Markward Schubert is currently offline Markward SchubertFriend
Messages: 15
Registered: July 2009
Junior Member
Hello everybody!

Short question:

Is there a way to programmatically set preferences in XULRunner, like pref("somepref","somevalue") or user_pref("somepref","somevalue") in the different pref.js files of Mozilla?

What we especially would like to set is spellchecker.dictionary. Ideally this could be set at runtime, so that the next page, which is rendered, can be spellchecked with the new dictionary set.

Any help is appreciated.

Regards,
Markward
Re: Setting XULRunner properties programmatically [message #805256 is a reply to message #804539] Thu, 23 February 2012 14:52 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi Markward,

The only way to do this would be via JavaXPCOM. For info on JavaXPCOM
see http://www.eclipse.org/swt/faq.php#howusejavaxpcom . For an example
of using XPCOM to change some mozilla preference values see
http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/bundles/org.eclipse.swt/Eclipse%20SWT%20Mozilla/common/org/eclipse/swt/browser/Mozilla.java?id=v3821b#n2295
(the code to do the equivalent in JavaXPCOM would follow the same
general steps but would be more straight-forward).

HTH,
Grant


On 2/22/2012 1:51 PM, Markward Schubert wrote:
> Hello everybody!
>
> Short question:
> Is there a way to programmatically set preferences in XULRunner, like
> pref("somepref","somevalue") or user_pref("somepref","somevalue") in the
> different pref.js files of Mozilla?
>
> What we especially would like to set is spellchecker.dictionary. Ideally
> this could be set at runtime, so that the next page, which is rendered,
> can be spellchecked with the new dictionary set.
>
> Any help is appreciated.
>
> Regards,
> Markward
Previous Topic:Is it possible to modify how Text swt widget wrap word?
Next Topic:How to close progress bar only after all asyncExecs?
Goto Forum:
  


Current Time: Sat Apr 27 00:06:03 GMT 2024

Powered by FUDForum. Page generated in 0.05487 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top