Bug 487378 - Use the app name as the default client name

Use nsIXULAppInfo to get the name and remove Fennec specific bits.
This commit is contained in:
Edward Lee 2009-04-08 02:12:57 -05:00
Родитель 1bb93a35bc
Коммит a5332e83ca
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -5,7 +5,6 @@ fennec.turned-off = Weave is turned off.
fennec.login.error = Weave had an error when trying to log in.
fennec.login.error.detail = Login error: %S
fennec.default.client.name = Fennec
fennec.default.client.type = Mobile
fennec.sync.complete.time = Sync completed at %S, %S

Просмотреть файл

@ -116,7 +116,7 @@ ClientEngine.prototype = {
Svc.Prefs.reset("client.syncID");
},
get clientName() { return Svc.Prefs.get("client.name", "Firefox"); },
get clientName() { return Svc.Prefs.get("client.name", Svc.AppInfo.name); },
set clientName(value) { Svc.Prefs.set("client.name", value); },
get clientType() { return Svc.Prefs.get("client.type", "desktop"); },

Просмотреть файл

@ -632,7 +632,8 @@ Utils.EventListener.prototype = {
let Svc = {};
Svc.Prefs = new Preferences(PREFS_BRANCH);
[["Crypto", "@labs.mozilla.com/Weave/Crypto;1", "IWeaveCrypto"],
[["AppInfo", "@mozilla.org/xre/app-info;1", "nsIXULAppInfo"],
["Crypto", "@labs.mozilla.com/Weave/Crypto;1", "IWeaveCrypto"],
["Directory", "@mozilla.org/file/directory_service;1", "nsIProperties"],
["IO", "@mozilla.org/network/io-service;1", "nsIIOService"],
["Login", "@mozilla.org/login-manager;1", "nsILoginManager"],