Closed Bug 570156 Opened 15 years ago Closed 15 years ago

Convert download dialog to a nsIPromptService prompt

Categories

(Firefox for Android Graveyard :: General, defect)

Fennec 1.1
x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mfinkle, Assigned: mfinkle)

Details

Attachments

(1 file)

We changed the styling of buttons in most dialogs and prompts but forgot the download dialog: http://mxr.mozilla.org/mobile-browser/source/chrome/content/browser.xul#501 As Matt points out, we could just remove this dialog and use a prompt instead. That would reduce the browser.xul size and give the dialog the new styling.
Summary: Convet download dialog to a nsIPromptService prompt → Convert download dialog to a nsIPromptService prompt
Attached patch patchSplinter Review
This patch converts the dialog to a prompt. It removes the browser.xul and browser.js parts.
Attachment #449314 - Flags: review?(mbrubeck)
One problem is that "escape" always selects the button with index 1 (bug 345067). This means that pressing "escape" (which includes the Back button on Android) will sometimes open the file instead of cancelling the download.
(In reply to comment #2) > One problem is that "escape" always selects the button with index 1 (bug > 345067). This means that pressing "escape" (which includes the Back button on > Android) will sometimes open the file instead of cancelling the download. Let's assume we will fix bug 345067, if only in Fennec if it comes to that. However, I think we can get a fix into toolkit too since the prompt code is being rewritten (bug 563274).
Matt, go ahead and review this patch and we'll handle the confirmEx problem in a different bug.
Comment on attachment 449314 [details] [diff] [review] patch >+ let flags = Ci.nsIPrompt.BUTTON_POS_1_DEFAULT + I don't think BUTTON_POS_1_DEFAULT is right, since it's either "Nothing" or "Open" depending on the dialog. We should leave this off and we'll get button 0 ("Save") as the default. >+helperApp.prompt=What would you like to do with: I'm surprised the localizers haven't complained about this, since it seems like the filename wouldn't naturally come at the end of the sentence in all languages. But it's not a new problem in this patch, and I guess they dealt with it before... r+ with the default button change.
Attachment #449314 - Flags: review?(mbrubeck) → review+
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Verified fixed on: Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110921 Firefox/9.0a1 Fennec/9.0a1 Device: HTC Desire OS: Android 2.2
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: