Closed Bug 169044 Opened 23 years ago Closed 23 years ago

Implement prefs to allow single-click downloading and helper app dispatch

Categories

(Camino Graveyard :: Downloading, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Camino0.7

People

(Reporter: sdagley, Assigned: sdagley)

Details

(Keywords: relnote)

Attachments

(1 file, 1 obsolete file)

Due to the security implications of #151047 logging this bug to go ahead and implement single-click download seperate from single-click download and launch of helper app
Target Milestone: --- → Chimera0.6
Changed description and morphed bug into implementing a pref to enable the automatic helper app dispatch via uriloader.
Summary: Implement single-click downloading for Chimera → Implement pref to allow single-click downloading for Chimera
Target Milestone: Chimera0.6 → Chimera0.7
This patches the Chimera side of the code to determine whether or not downloads should prompt for a name or just automatically download to the folder specified in the Internet prefs pane. The next step is to make uriloader automatically dispatch to the appropriate helper app. Actually I thought it _was_ doing that as part of my patch for #151047 but reality doesn't bear that out so more uriloader fun.
I don't know what was wrong with uriloader in my build from last week but things are working as intended now. This new patch also makes the DL progress dialog go away at the completion of the DL when the automatic DL and helper dispatch pref is enabled
Attachment #105808 - Attachment is obsolete: true
Attachment #106938 - Flags: review?(sfraser)
+ if (autoHelperDispatch == PR_FALSE) { + // Pref not enabled so do it old way - always prompt to save file to disk + return inLauncher->SaveToDisk(nsnull, PR_FALSE); + } + else { + // Pref is enabled so just save the file to disk in download folder + // then invoke the default helper app + // XXX fix me. When we add UI to enable this pref it needs to be clear it carries + // a security risk + return inLauncher->LaunchWithApplication(nsnull, PR_FALSE); + } Seems to make sense to reverse these lines: if (autoHelperDispatch) return inLauncher->LaunchWithApplication(nsnull, PR_FALSE); else return inLauncher->SaveToDisk(nsnull, PR_FALSE); Both patches are the same...
Logic changed as suggested and checked in. There's no UI for enabling this pref yet but it can be tested by adding the following line to your user.js file: user_pref("browser.download.autoDispatch", true); If you don't have a user.js file it's a plain text file and goes in your profile directory at the same level as your prefs.js file
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
you could just add that line to the prefs.js, too, right?
oops, forgot to say: thanks! :)
prefs.js should _never_ be edited by hand. That's why user.js exists.
Attachment #106938 - Flags: review?(sfraser) → review+
Marking verified in the 2002-11-22-04 when setting is made to user.js
Status: RESOLVED → VERIFIED
There is a bug in this, I think. The external app is still called if you hit the cancel button in the download dialog before the file has completed downloading.
Yes, http://bugzilla.mozilla.org/show_bug.cgi?id=181417 is filed for that (it has nothing to do with the pref, we're just not handling the cancel in the backend like we should)
Reopening bug as the auto-download and auto-dispatch prefs are being split into 2 seperate prefs - browser.download.autoDownload and browser.download.autoDispatch The default values for these prefs are auto-download enabled and auto-dispatch disabled. As before the auto-dispatch feature can be enabled by adding the following line to user.js: user_pref("browser.download.autoDispatch", true);
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Summary: Implement pref to allow single-click downloading for Chimera → Implement prefs to allow single-click downloading and helper app dispatch
Code checked in to implement 2 seperate prefs as described in previous comment
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
Verifying that the two prefs setting are working in the 2002-12-03-05 NB. By default, Chimera does indeed auto-download the file but doesn't launch the associated helper app. Adding the user_pref("browser.download.autoDispatch", true) string will launch the helper app for that MIME type.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: