fix regression: checkbox state of the confirmation notification is saved correctly (truely!)
This commit is contained in:
parent
c1e1aa6520
commit
d190070edc
@ -69,8 +69,9 @@ var confirmWithTab;
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
var checkbox;
|
||||||
if (aOptions.checkbox) {
|
if (aOptions.checkbox) {
|
||||||
let checkbox = notification.ownerDocument.createElement('checkbox');
|
checkbox = notification.ownerDocument.createElement('checkbox');
|
||||||
checkbox.setAttribute('label', aOptions.checkbox.label);
|
checkbox.setAttribute('label', aOptions.checkbox.label);
|
||||||
if (aOptions.checkbox.checked)
|
if (aOptions.checkbox.checked)
|
||||||
checkbox.setAttribute('checked', 'true');
|
checkbox.setAttribute('checked', 'true');
|
||||||
@ -80,11 +81,6 @@ var confirmWithTab;
|
|||||||
container.appendChild(checkbox);
|
container.appendChild(checkbox);
|
||||||
|
|
||||||
notification.appendChild(container);
|
notification.appendChild(container);
|
||||||
|
|
||||||
deferred.next(function(aButtonIndex) {
|
|
||||||
aOptions.checkbox.checked = checkbox.checked;
|
|
||||||
return aButtonIndex;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var strip = b.tabContainer || b.mTabContainer;
|
var strip = b.tabContainer || b.mTabContainer;
|
||||||
@ -107,7 +103,12 @@ var confirmWithTab;
|
|||||||
});
|
});
|
||||||
notification.parentNode.addEventListener('DOMNodeRemoved', handleEvent, false);
|
notification.parentNode.addEventListener('DOMNodeRemoved', handleEvent, false);
|
||||||
|
|
||||||
return deferred;
|
return deferred
|
||||||
|
.next(function(aButtonIndex) {
|
||||||
|
if (aOptions.checkbox)
|
||||||
|
aOptions.checkbox.checked = checkbox.checked;
|
||||||
|
return aButtonIndex;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function getTabBrowserFromChild(aTabBrowserChild)
|
function getTabBrowserFromChild(aTabBrowserChild)
|
||||||
|
@ -437,7 +437,9 @@ var TreeStyleTabUtils = {
|
|||||||
{
|
{
|
||||||
var behavior = this.undoCloseTabSetBehavior;
|
var behavior = this.undoCloseTabSetBehavior;
|
||||||
if (!(behavior & this.kUNDO_ASK))
|
if (!(behavior & this.kUNDO_ASK))
|
||||||
return Deferred.next();
|
return Deferred.next(function() {
|
||||||
|
return behavior;
|
||||||
|
});
|
||||||
|
|
||||||
if (behavior & this.kUNDO_CLOSE_SET) behavior ^= this.kUNDO_CLOSE_SET;
|
if (behavior & this.kUNDO_CLOSE_SET) behavior ^= this.kUNDO_CLOSE_SET;
|
||||||
|
|
||||||
@ -461,10 +463,13 @@ var TreeStyleTabUtils = {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.next(function(aButtonIndex) {
|
.next(function(aButtonIndex) {
|
||||||
if (aButtonIndex == 0)
|
if (aButtonIndex == 0) {
|
||||||
behavior |= self.kUNDO_CLOSE_SET;
|
behavior |= self.kUNDO_CLOSE_SET;
|
||||||
if (checkbox.checked)
|
}
|
||||||
|
if (checkbox.checked) {
|
||||||
|
behavior ^= self.kUNDO_ASK;
|
||||||
self.setTreePref('undoCloseTabSet.behavior', behavior);
|
self.setTreePref('undoCloseTabSet.behavior', behavior);
|
||||||
|
}
|
||||||
return behavior;
|
return behavior;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user