Closed
Bug 712421
Opened 13 years ago
Closed 13 years ago
allow pasting a URL in the download manager window to download it
Categories
(Toolkit :: Downloads API, defect)
Toolkit
Downloads API
Tracking
()
RESOLVED
FIXED
mozilla12
People
(Reporter: Gavin, Assigned: Gavin)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
neil
:
review+
|
Details | Diff | Splinter Review |
Apparently Safari has this feature. It seems neat.
Assignee | ||
Comment 1•13 years ago
|
||
This works. There may be an more elegant way to hook into "paste", though.
Assignee | ||
Comment 3•13 years ago
|
||
Assignee: nobody → gavin.sharp
Attachment #583271 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #583291 -
Flags: review?(neil)
Comment 4•13 years ago
|
||
Comment on attachment 583291 [details] [diff] [review]
patch
Sorry for the delay in getting around to reviewing this.
>+ try {
>+ trans.getAnyTransferData(type, data, {});
>+ if (flavors.indexOf(type.value) == -1)
Transferables can only ever return flavours that you added to them, so this check is entirely unnecessary.
>+ [url, name] = data.value.QueryInterface(Ci.nsISupportsString).data.split("\n");
>+ } catch (ex) {}
Separate try/catch blocks are preventing you from declaring your variables here (and even I wouldn't use var as a workaround). I don't see any downside to having one catch to rule them all.
>+ <key id="pasteKey"
>+ key="V"
>+ modifiers="accel"
>+ oncommand="pasteHandler();"/>
I can't remember whether this will conflict with the search textbox (I assume here that you want Accel+V to have its usual effect there) and SeaMonkey's download manager uses a proper command controller which definitely won't conflict with the textbox so I can give you f+ but not r+.
Attachment #583291 -
Flags: review?(neil) → feedback+
Assignee | ||
Comment 5•13 years ago
|
||
I tested - the <key> doesn't interfere with pasting in the text box.
Attachment #583291 -
Attachment is obsolete: true
Attachment #588184 -
Flags: review?(neil)
Updated•13 years ago
|
Attachment #588184 -
Flags: review?(neil) → review+
Assignee | ||
Comment 6•13 years ago
|
||
Target Milestone: --- → mozilla12
Comment 7•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
*ROFL*
See Bug 506881, 3-year duplicate closed as WONTFIX.
Anyway this 'trick' is practical, great to see it added.
Just a question:
- pasting an URL in the download manager is allowed,
- dragging & dropping an element of a webpage into the download manager is allowed,
Why dragging & dropping directly an URL from the location bar into the download manager is not allowed?
May I fill a bug for that?
Comment 9•13 years ago
|
||
(In reply to Loic from comment #8)
> *ROFL*
> See Bug 506881, 3-year duplicate closed as WONTFIX.
These things happen.
> Why dragging & dropping directly an URL from the location bar into the
> download manager is not allowed?
>
> May I fill a bug for that?
Please do. And if you want to write the patch... :)
Comment 10•13 years ago
|
||
(In reply to Paul O'Shannessy [:zpao] from comment #9)
> (In reply to Loic from comment #8)
> > May I fill a bug for that?
>
> Please do. And if you want to write the patch... :)
Filled Bug 722670.
You need to log in
before you can comment on or make changes to this bug.
Description
•