Open Bug 609510 Opened 14 years ago Updated 2 years ago

drop support for modal prompts with 4 buttons

Categories

(Toolkit :: General, defect)

defect

Tracking

()

People

(Reporter: Dolske, Unassigned)

Details

Currently nsIPrompt-type prompts allow creating a dialog with 4 buttons (via ConfirmEx). We don't use this, such prompts are kind of bad UI, and so we should just drop the code that implements it.
nsIPrompt's interface definition for confirmEx only allows specifying 3 buttons (0-2), AFAICT, and that's all that the impl (confirmExHelper in nsPrompter.js) supports too, so I think the commonDialog.js support for it really is just dead code (rather than just "unused by us"/"bad UI").
Oh, hmm, you're right. I thought confirmEx was able to do that.
So the fourth button is used differently in dialogs than it is in prompts, so the code would need to remain in commonDialog.js.

In dialog uses, button 0 is ok, button 1 is cancel, button 2 is extra1 and button 3 is extra2. So anyplace that uses extra2 is using the 4th button. I see that in a few places in the code:

http://mxr.mozilla.org/mozilla-central/search?string=extra2&find=&findi=&filter=%5E%5B%5E%5C0%5D*%24&hitlimit=&tree=mozilla-central

However, there's no reason button3 can't be removed from CommonDialog.jsm.

I have a patch to remove from CommonDialog.jsm, but I couldn't find the code that creates the tab modal prompt dialog to see if any code could be pulled from there. Can you point me there?

I verified that nsPrompter.js needs no changes.
(In reply to Michael Kaply (mkaply) from comment #3)
> So the fourth button is used differently in dialogs than it is in prompts,
> so the code would need to remain in commonDialog.js.

Generic dialogs don't use commonDialog.js, so I don't see how this is relevant.
Target Milestone: --- → mozilla9
Version: unspecified → Trunk
Target Milestone: mozilla9 → ---
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.