Hi,
I am having a problem of setting default charset
preference for embedding Gecko in galeon. The code
will
invoke SetCharPref for nsIPref instance.
mozilla_preference_set(const char *preference_name,
const char *new_value)
{
g_return_val_if_fail (preference_name != NULL, FALSE);
g_return_val_if_fail (new_value != NULL, FALSE);
nsCOMPtr<nsIPref> pref = do_CreateInstance(PREF_ID);
if (pref)
{
nsresult rv = pref->SetCharPref (preference_name,
new_value);
return NS_SUCCEEDED (rv) ? TRUE : FALSE;
}
return FALSE;
}
The first(and the only first) time is O.K. but if I
change the default charset at a second time and later
then it won't take effect right away. I have to
restart the browser to make it take effect.
mozilla_preference_set ("intl.charset.default",
"EUC-JP");
It's quite annoy me. Also, I am setting language auto
detect "Off" by
mozilla_preference_set ("intl.charset.detector", "");
Can anyone help? Thanks a lot.
BTW, is there a mailing list I can subscribe for
embedding mozilla?
Regards,
Tony
_________________________________________________________
Do You Yahoo!?
�n�O�K�O�� @yahoo.com ����q�l�l�� @ http://chinese.mail.yahoo.com
Get your free @yahoo.com address at http://chinese.mail.yahoo.com