Don't show sound indicator for flat parent tabs
This commit is contained in:
parent
63d1021dff
commit
35783c647f
@ -6180,9 +6180,12 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
|
|||||||
{
|
{
|
||||||
var children = this.getChildTabs(aTab);
|
var children = this.getChildTabs(aTab);
|
||||||
|
|
||||||
var hasSoundPlayingChild = children.some(function(aChild) {
|
var hasSoundPlayingChild = (
|
||||||
|
this.allowSubtreeCollapseExpand &&
|
||||||
|
children.some(function(aChild) {
|
||||||
return aChild.getAttribute('soundplaying') == 'true';
|
return aChild.getAttribute('soundplaying') == 'true';
|
||||||
}, this);
|
}, this)
|
||||||
|
);
|
||||||
var reallySoundPlaying = this.getTabValue(aTab, this.kREALLY_SOUND_PLAYING) == 'true';
|
var reallySoundPlaying = this.getTabValue(aTab, this.kREALLY_SOUND_PLAYING) == 'true';
|
||||||
if (hasSoundPlayingChild ||
|
if (hasSoundPlayingChild ||
|
||||||
reallySoundPlaying)
|
reallySoundPlaying)
|
||||||
@ -6190,9 +6193,12 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
|
|||||||
else
|
else
|
||||||
aTab.removeAttribute('soundplaying');
|
aTab.removeAttribute('soundplaying');
|
||||||
|
|
||||||
var allChildrenMuted = children.length > 0 && children.every(function(aChild) {
|
var allChildrenMuted = (
|
||||||
|
this.allowSubtreeCollapseExpand &&
|
||||||
|
children.length > 0 && children.every(function(aChild) {
|
||||||
return aChild.getAttribute('muted') == 'true';
|
return aChild.getAttribute('muted') == 'true';
|
||||||
}, this);
|
}, this)
|
||||||
|
);
|
||||||
if ((allChildrenMuted && !reallySoundPlaying) ||
|
if ((allChildrenMuted && !reallySoundPlaying) ||
|
||||||
this.getTabValue(aTab, this.kREALLY_MUTED) == 'true')
|
this.getTabValue(aTab, this.kREALLY_MUTED) == 'true')
|
||||||
aTab.setAttribute('muted', true);
|
aTab.setAttribute('muted', true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user