mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Preferences - Show Cookies - "Remove Selected" button should not be active if there are no items
This commit is contained in:
parent
84250c0083
commit
ec107bb60e
2 changed files with 6 additions and 2 deletions
|
|
@ -565,6 +565,8 @@ var gCookiesWindow = {
|
|||
onCookieSelected: function () {
|
||||
var item;
|
||||
var seln = this._tree.view.selection;
|
||||
var hasRows = this._tree.view.rowCount > 0;
|
||||
var hasSelection = seln.count > 0;
|
||||
if (!this._view._filtered)
|
||||
item = this._view._getItemAtIndex(seln.currentIndex);
|
||||
else
|
||||
|
|
@ -592,7 +594,7 @@ var gCookiesWindow = {
|
|||
removeSelectedCookies.label = PluralForm.get(selectedCookieCount, buttonLabel)
|
||||
.replace("#1", selectedCookieCount);
|
||||
|
||||
removeSelectedCookies.disabled = !(seln.count > 0);
|
||||
removeSelectedCookies.disabled = !hasRows || !hasSelection;
|
||||
},
|
||||
|
||||
performDeletion: function gCookiesWindow_performDeletion(deleteItems) {
|
||||
|
|
|
|||
|
|
@ -540,6 +540,8 @@ var gCookiesWindow = {
|
|||
onCookieSelected: function () {
|
||||
var properties, item;
|
||||
var seln = this._tree.view.selection;
|
||||
var hasRows = this._tree.view.rowCount > 0;
|
||||
var hasSelection = seln.count > 0;
|
||||
if (!this._view._filtered)
|
||||
item = this._view._getItemAtIndex(seln.currentIndex);
|
||||
else
|
||||
|
|
@ -570,7 +572,7 @@ var gCookiesWindow = {
|
|||
removeSelectedCookies.label = PluralForm.get(selectedCookieCount, buttonLabel)
|
||||
.replace("#1", selectedCookieCount);
|
||||
|
||||
removeSelectedCookies.disabled = !(seln.count > 0);
|
||||
removeSelectedCookies.disabled = !hasRows || !hasSelection;
|
||||
},
|
||||
|
||||
performDeletion: function gCookiesWindow_performDeletion(deleteItems) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue