From 204861771786871f9a4e95c5213f024138f26f78 Mon Sep 17 00:00:00 2001 From: "varga%nixcorp.com" Date: Thu, 30 Oct 2003 15:08:48 +0000 Subject: [PATCH] Checking in for Jungshik Shin. Fix for bug 195093. 'modernize' nsILocale and nsIPlatformCharset. r=smontagu sr=darin --- browser/base/content/contentAreaUtils.js | 2 +- browser/components/bookmarks/content/bookmarks.js | 4 ++-- toolkit/content/widgets/browser.xml | 2 +- toolkit/content/widgets/stringbundle.xml | 2 +- toolkit/content/widgets/wizard.xml | 2 +- toolkit/xre/nsAppRunner.cpp | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/browser/base/content/contentAreaUtils.js b/browser/base/content/contentAreaUtils.js index fd217eb2890..caada093fe0 100644 --- a/browser/base/content/contentAreaUtils.js +++ b/browser/base/content/contentAreaUtils.js @@ -685,7 +685,7 @@ function getStringBundle() const lsContractID = "@mozilla.org/intl/nslocaleservice;1"; const lsIID = Components.interfaces.nsILocaleService; const ls = Components.classes[lsContractID].getService(lsIID); - var appLocale = ls.GetApplicationLocale(); + var appLocale = ls.getApplicationLocale(); return sbs.createBundle(bundleURL, appLocale); } diff --git a/browser/components/bookmarks/content/bookmarks.js b/browser/components/bookmarks/content/bookmarks.js index a4715e5d401..9af9ac2cd21 100644 --- a/browser/components/bookmarks/content/bookmarks.js +++ b/browser/components/bookmarks/content/bookmarks.js @@ -1013,9 +1013,9 @@ var BookmarksUtils = { var BUNDLESVC = Components.classes["@mozilla.org/intl/stringbundle;1"] .getService(Components.interfaces.nsIStringBundleService); var bookmarksBundle = "chrome://browser/locale/bookmarks/bookmarks.properties"; - this._bundle = BUNDLESVC.createBundle(bookmarksBundle, LOCALESVC.GetApplicationLocale()); + this._bundle = BUNDLESVC.createBundle(bookmarksBundle, LOCALESVC.getApplicationLocale()); var brandBundle = "chrome://global/locale/brand.properties"; - this._brandShortName = BUNDLESVC.createBundle(brandBundle, LOCALESVC.GetApplicationLocale()) + this._brandShortName = BUNDLESVC.createBundle(brandBundle, LOCALESVC.getApplicationLocale()) .GetStringFromName("brandShortName"); } diff --git a/toolkit/content/widgets/browser.xml b/toolkit/content/widgets/browser.xml index dc580c35ac0..753d2dc3f52 100644 --- a/toolkit/content/widgets/browser.xml +++ b/toolkit/content/widgets/browser.xml @@ -283,7 +283,7 @@ var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"] .getService(Components.interfaces.nsIStringBundleService); var bundleURL = "chrome://global/locale/tabbrowser.properties"; - this._mStrBundle = stringBundleService.createBundle(bundleURL, localeService.GetApplicationLocale()); + this._mStrBundle = stringBundleService.createBundle(bundleURL, localeService.getApplicationLocale()); } return this._mStrBundle; ]]> diff --git a/toolkit/content/widgets/stringbundle.xml b/toolkit/content/widgets/stringbundle.xml index 2a9ae82daa8..0429c2f7a8a 100644 --- a/toolkit/content/widgets/stringbundle.xml +++ b/toolkit/content/widgets/stringbundle.xml @@ -68,7 +68,7 @@ try { var localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"] .getService(Components.interfaces.nsILocaleService); - return localeService.GetApplicationLocale(); + return localeService.getApplicationLocale(); } catch (ex) { return null; diff --git a/toolkit/content/widgets/wizard.xml b/toolkit/content/widgets/wizard.xml index 5ef3fd54fcc..4e657bbdbf9 100644 --- a/toolkit/content/widgets/wizard.xml +++ b/toolkit/content/widgets/wizard.xml @@ -154,7 +154,7 @@ .getService(Components.interfaces.nsILocaleService); var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService); var bundleURL = "chrome://global/locale/wizard.properties"; - this._bundle = stringBundleService.createBundle(bundleURL, localeService.GetApplicationLocale()); + this._bundle = stringBundleService.createBundle(bundleURL, localeService.getApplicationLocale()); // get anonymous content references this._wizardHeader = document.getAnonymousElementByAttribute(this, "anonid", "Header"); diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 82b0b29e45d..262fd43f7ba 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -820,9 +820,9 @@ getUILangCountry(nsAString& aUILang, nsAString& aCountry) nsCOMPtr localeService = do_GetService(NS_LOCALESERVICE_CONTRACTID, &result); NS_ASSERTION(NS_SUCCEEDED(result),"getUILangCountry: get locale service failed"); - nsXPIDLString uiLang; - result = localeService->GetLocaleComponentForUserAgent(getter_Copies(uiLang)); - aUILang = uiLang; + result = localeService->GetLocaleComponentForUserAgent(aUILang); + NS_ASSERTION(NS_SUCCEEDED(result), + "getUILangCountry: get locale componet for user agent failed"); result = getCountry(aUILang, aCountry); return result; }