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

VERIFIED FIXED in Firefox1.5

Status

()

Firefox
Preferences
VERIFIED FIXED
13 years ago
12 years ago

People

(Reporter: Caleb, Assigned: Caleb)

Tracking

Trunk
Firefox1.5
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

13 years ago
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.

Comment 1

13 years ago
Confirmed with DPA2: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b3)
Gecko/20050707 Firefox/1.0+ ID:2005070719
(Assignee)

Comment 2

13 years ago
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
(Assignee)

Comment 3

13 years ago
Created attachment 188670 [details] [diff] [review]
patch v1.0

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)
(Assignee)

Comment 4

13 years ago
Created attachment 188676 [details] [diff] [review]
patch v1.1

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)
(Assignee)

Updated

13 years ago
Attachment #188670 - Flags: review?(mconnor)
(Assignee)

Comment 5

13 years ago
Created attachment 188683 [details] [diff] [review]
patch v1.2

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)
(Assignee)

Updated

13 years ago
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-
(Assignee)

Updated

13 years ago
Attachment #188683 - Flags: review?(mconnor)

Updated

13 years ago
Attachment #188683 - Flags: review?(mconnor) → review+
(Assignee)

Comment 8

13 years ago
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.
(Assignee)

Comment 10

13 years ago
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?
(Assignee)

Updated

13 years ago
Attachment #188683 - Flags: approval1.8b4?

Updated

13 years ago
Attachment #188683 - Flags: approval1.8b4? → approval1.8b4+
(Assignee)

Updated

13 years ago
Whiteboard: [checkin needed]
(Assignee)

Updated

13 years ago
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
Last Resolved: 13 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Firefox1.1
Status: RESOLVED → VERIFIED
Blocks: 300001

Comment 12

13 years ago
*** 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.