> Mandi! Onno Ekker
> In chel di` si favelave...
>
>> No, the defaults/preferences folder is no longer used. You can keep it
>> maybe for backwards compatibility, but you don't need it, as the
>> function getDefaultBranch is also backwards compatible.
>>
>> You have to change setBoolPref to setIntPref and setCharPref respectively.
>>
>> And have you defined the constants?
>>
>> const Cc = Components.classes, Ci = Components.interfaces;
> Ok, now my code is:
>
> const Cc = Components.classes, Ci = Components.interfaces;
> var prefService = Cc["@
mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService);
> var defaultBranch = prefService.getDefaultBranch("extensions.tbdialout.");
> defaultBranch.setCharPref("proto", "asteriskami" );
> defaultBranch.setCharPref("ami.channel", "SIP/XXX" );
> defaultBranch.setCharPref("ami.context", "outcall" );
> defaultBranch.setCharPref("ami.host", "
pbx.sv.lnf.it" );
> defaultBranch.setIntPref("ami.port", 5038 );
> defaultBranch.setCharPref("ami.user", "dialer" );
> defaultBranch.setCharPref("ami.pass", "dialer" );
> defaultBranch.setCharPref("ami.callerid", "tb/" );
> defaultBranch.setIntPref("ami.timeout", 15000 );
>
> but still i don't now where to put it; a .js in defaults/preferences
> folder seems not suffices...
>
> Thanks.
>