39790 : [L12y] Move all localizable prefs into chrome:// .r=morse

This commit is contained in:
tao%netscape.com 2000-07-13 23:51:35 +00:00
parent 4ca7243533
commit 5480ed0649
3 changed files with 23 additions and 0 deletions

View File

@ -195,6 +195,20 @@ SI_GetCharPref(const char * prefname, char** aPrefvalue) {
}
}
PUBLIC void
SI_GetLocalizedUnicharPref(const char * prefname, PRUnichar** aPrefvalue) {
nsresult ret;
nsCOMPtr<nsIPref> pPrefService = do_GetService(kPrefServiceCID, &ret);
if (!NS_FAILED(ret)) {
ret = pPrefService->GetLocalizedUnicharPref(prefname, aPrefvalue);
if (NS_FAILED(ret)) {
*aPrefvalue = nsnull;
}
} else {
*aPrefvalue = nsnull;
}
}
/*********************************
* Preferences for Single Signon *

View File

@ -98,6 +98,9 @@ SI_SetCharPref(const char * prefname, const char * prefvalue);
extern void
SI_GetCharPref(const char * prefname, char** aPrefvalue);
extern void
SI_GetLocalizedUnicharPref(const char * prefname, PRUnichar** aPrefvalue);
extern void SI_InitSignonFileName();
extern PRBool

View File

@ -2276,7 +2276,13 @@ static void
wallet_FetchFileForUseInNextBrowserSession() {
/* obtain the server from which to fetch the composite file to be used in next session */
#if 1
nsXPIDLString ustr;
SI_GetLocalizedUnicharPref(pref_WalletServer, getter_Copies(ustr));
wallet_Server = NS_ConvertUCS2toUTF8(ustr);
#else
SI_GetCharPref(pref_WalletServer, &wallet_Server);
#endif
if (!wallet_Server || (*wallet_Server == '\0')) {
/* user does not want to download mapping tables */
return;