diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 27e91333..cff907f6 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -147,4 +147,9 @@ pref("extensions.treestyletab.compatibility.TMP", true); // Tab Mix Plus pref("extensions.treestyletab.compatibility.STM.warnForNewTabPosition", true); // Super Tab Mode +pref("extensions.treestyletab.platform.Darwin.tabbar.style", "metal"); +pref("extensions.treestyletab.platform.Darwin.indent.property.top", "margin-bottom"); +pref("extensions.treestyletab.platform.Linux.tabbar.style", "plain"); + + pref("extensions.treestyletab.prefsVersion", 0); diff --git a/modules/utils.js b/modules/utils.js index 89fdeb48..7cfb86b4 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -248,7 +248,9 @@ var TreeStyleTabUtils = { { if (this._initialized) return; - this.isMac = this.XULAppInfo.OS.toLowerCase().indexOf('darwin') > -1; + this.isMac = this.XULAppInfo.OS == 'Darwin'; + + this.applyPlatformDefaultPrefs(); this.addPrefListener(this); @@ -267,7 +269,7 @@ var TreeStyleTabUtils = { this.onPrefChange('extensions.treestyletab.twisty.expandSensitiveArea'); try { - if (this.XULAppInfo.OS.toLowerCase().indexOf('winnt') > -1) + if (this.XULAppInfo.OS == 'WINNT') this.updateAeroPeek(); } catch(e) { @@ -275,6 +277,13 @@ var TreeStyleTabUtils = { } }, _initialized : false, + applyPlatformDefaultPrefs : function TSTUtils_applyPlatformDefaultPrefs() + { + var OS = this.XULAppInfo.OS; + this.getDescendant('extensions.treestyletab.platform.'+OS).forEach(function(aKey) { + this.setDefaultPref(aKey.replace('platform.'+OS+'.', ''), this.getDefaultPref(aKey)); + }, this); + }, updateAeroPeek : function TSTUtils_updateAeroPeek() { diff --git a/platform/Darwin/defaults/preferences/treestyletab.js b/platform/Darwin/defaults/preferences/treestyletab.js deleted file mode 100644 index 1163ca96..00000000 --- a/platform/Darwin/defaults/preferences/treestyletab.js +++ /dev/null @@ -1,2 +0,0 @@ -pref("extensions.treestyletab.tabbar.style", "metal"); -pref("extensions.treestyletab.indent.property.top", "margin-bottom"); diff --git a/platform/Linux/defaults/preferences/treestyletab.js b/platform/Linux/defaults/preferences/treestyletab.js deleted file mode 100644 index 67382ae2..00000000 --- a/platform/Linux/defaults/preferences/treestyletab.js +++ /dev/null @@ -1 +0,0 @@ -pref("extensions.treestyletab.tabbar.style", "plain");