diff --git a/modules/groupTab.js b/modules/groupTab.js index 080f1b4a..58281ea1 100644 --- a/modules/groupTab.js +++ b/modules/groupTab.js @@ -299,9 +299,13 @@ GroupTab.prototype = inherit(TreeStyleTabBase, { tab.parentNode.addEventListener(this.kEVENT_TYPE_ATTACHED, this, false); tab.parentNode.addEventListener(this.kEVENT_TYPE_DETACHED, this, false); - this.tabsObserver = new TabAttributesObserver(this.browser.tabContainer, (function(aTab) { - this.onTabModified(aTab); - }).bind(this)); + this.tabsObserver = new TabAttributesObserver({ + container : this.browser.tabContainer, + attributes : 'label,visibleLabel,image', + callback : (function(aTab) { + this.onTabModified(aTab); + }).bind(this) + }); this.editor.addEventListener('keypress', this, false); diff --git a/modules/tabAttributesObserver.js b/modules/tabAttributesObserver.js index 8a622314..73fd930a 100644 --- a/modules/tabAttributesObserver.js +++ b/modules/tabAttributesObserver.js @@ -37,9 +37,12 @@ var EXPORTED_SYMBOLS = ['TabAttributesObserver']; Components.utils.import('resource://treestyletab-modules/constants.js'); -function TabAttributesObserver(aContainer, aCallback) { - this.container = aContainer; - this.callback = aCallback; +function TabAttributesObserver(aParams) { + this.container = aParams.container; + this.attributes = aParams.attributes; + if (typeof this.attributes == 'string') + this.attributes = this.attributes.split(','); + this.callback = aParams.callback; this.init(); } TabAttributesObserver.prototype = {