Merge pull request #366 from saneyuki/appinfo

Remove TreeStyleTabUtils.XULAppInfo
This commit is contained in:
YUKI "Piro" Hiroshi 2012-09-17 17:39:09 -07:00
commit 583adb2a8e

View File

@ -302,13 +302,6 @@ var TreeStyleTabUtils = {
}, },
_FocusManager : null, _FocusManager : null,
get XULAppInfo() {
if (!this._XULAppInfo) {
this._XULAppInfo = Services.appinfo;
}
return this._XULAppInfo;
},
_XULAppInfo : null,
get Comparator() { get Comparator() {
if (!this._Comparator) { if (!this._Comparator) {
this._Comparator = Services.vc; this._Comparator = Services.vc;
@ -319,7 +312,7 @@ var TreeStyleTabUtils = {
get isGecko10OrLater() get isGecko10OrLater()
{ {
return this.Comparator.compare(this.XULAppInfo.version, '10.0a') > 0; return this.Comparator.compare(Services.appinfo.version, '10.0a') > 0;
}, },
get treeBundle() { get treeBundle() {
@ -338,7 +331,7 @@ var TreeStyleTabUtils = {
{ {
if (this._initialized) return; if (this._initialized) return;
this.isMac = this.XULAppInfo.OS == 'Darwin'; this.isMac = Services.appinfo.OS == 'Darwin';
this.applyPlatformDefaultPrefs(); this.applyPlatformDefaultPrefs();
this.migratePrefs(); this.migratePrefs();
@ -363,7 +356,7 @@ var TreeStyleTabUtils = {
this.onPrefChange('extensions.treestyletab.counter.role.vertical'); this.onPrefChange('extensions.treestyletab.counter.role.vertical');
try { try {
if (this.XULAppInfo.OS == 'WINNT') if (Services.appinfo.OS == 'WINNT')
this.updateAeroPeek(); this.updateAeroPeek();
} }
catch(e) { catch(e) {
@ -380,7 +373,7 @@ var TreeStyleTabUtils = {
_initialized : false, _initialized : false,
applyPlatformDefaultPrefs : function TSTUtils_applyPlatformDefaultPrefs() applyPlatformDefaultPrefs : function TSTUtils_applyPlatformDefaultPrefs()
{ {
var OS = this.XULAppInfo.OS; var OS = Services.appinfo.OS;
var processed = {}; var processed = {};
var originalKeys = this.getDescendant('extensions.treestyletab.platform.'+OS); var originalKeys = this.getDescendant('extensions.treestyletab.platform.'+OS);
for (let i = 0, maxi = originalKeys.length; i < maxi; i++) for (let i = 0, maxi = originalKeys.length; i < maxi; i++)