Closed Bug 300074 Opened 19 years ago Closed 19 years ago

Disable actions when no items are selected in the Download Actions/Cookie Manager dialogs

Categories

(Firefox :: Settings UI, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox1.5

People

(Reporter: bugs.caleb, Assigned: bugs.caleb)

References

Details

Attachments

(1 file, 2 obsolete files)

Here's how to reproduce:

1. Tools > Options > Downloads > View & Edit Actions
2. Write something in the search field so no results are returned
3. Double click the empty treeview

An empty Change Action dialog will pop up.
Confirmed with DPA2: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b3)
Gecko/20050707 Firefox/1.0+ ID:2005070719
This seems to affect people who have a populated actions list.
Also, instead of double clicking you can also press the Change Action button.

http://lxr.mozilla.org/seamonkey/source/browser/components/preferences/downloadactions.js#616

616   editFileHandler: function ()
617   {
618     var selection = this._tree.view.selection; 
619     if (selection.count != 1)
620       return;

It seems that a check is in-place for this... but selection.count IS equal to 1,
 so I'm not really sure where this problem stems from.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch patch v1.0 (obsolete) — Splinter Review
This seems to take care of it.

We reset the selection if there are no items in view (instead of selecting a
magical-non existant 0 index), and if there are items then we just select the
first one (just like before).
Assignee: nobody → bugs.caleb
Status: NEW → ASSIGNED
Attachment #188670 - Flags: review?(mconnor)
Attached patch patch v1.1 (obsolete) — Splinter Review
Well, the previous patch seems to erase the selection that was made prior to
the current filter and this one should take care of it. (thx Mano)
Attachment #188670 - Attachment is obsolete: true
Attachment #188676 - Flags: review?(mconnor)
Attachment #188670 - Flags: review?(mconnor)
Attached patch patch v1.2Splinter Review
This is supposed to be the final revision.

It:
 * Makes sure that the "Change Action" button is also disabled when there are
no items in view
 * "Remove Cookie" button is disabled when there are no items in view
Attachment #188676 - Attachment is obsolete: true
Attachment #188683 - Flags: review?(mconnor)
Attachment #188676 - Flags: review?(mconnor)
Comment on attachment 188683 [details] [diff] [review]
patch v1.2


>+      if (view.rowCount > 0)
>+        view.selection.select(0);
>+

you have already returned out in the rowCount == 0 case.
Attachment #188683 - Flags: review?(mconnor) → review-
Comment on attachment 188683 [details] [diff] [review]
patch v1.2

ignore the last comment, i read it wrong.
Attachment #188683 - Flags: review-
Attachment #188683 - Flags: review?(mconnor)
Attachment #188683 - Flags: review?(mconnor) → review+
Comment on attachment 188683 [details] [diff] [review]
patch v1.2

Optimistically requesting approval for an itsy bitsy UI regression.
Attachment #188683 - Flags: approval-aviary1.1a2?
See bug 300001 for existing js warnings and errors.
Comment on attachment 188683 [details] [diff] [review]
patch v1.2

I'll re-request approval once we're done with 1.1a2.
Attachment #188683 - Flags: approval-aviary1.1a2?
Attachment #188683 - Flags: approval1.8b4?
Attachment #188683 - Flags: approval1.8b4? → approval1.8b4+
Whiteboard: [checkin needed]
Summary: Double clicking on an empty tree in the Download Actions dialog pops up an empty edit dialog → Disable actions when no items are selected in the Download Actions/Cookie Manager dialogs
Checking in cookies.js;
/cvsroot/mozilla/browser/components/preferences/cookies.js,v  <--  cookies.js
new revision: 1.8; previous revision: 1.7
done
Checking in downloadactions.js;
/cvsroot/mozilla/browser/components/preferences/downloadactions.js,v  <-- 
downloadactions.js
new revision: 1.4; previous revision: 1.3
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Firefox1.1
Status: RESOLVED → VERIFIED
*** Bug 284094 has been marked as a duplicate of this bug. ***
*** Bug 297617 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: