Open
Bug 167282
Opened 23 years ago
Updated 3 years ago
remove "nsILocalFile file" and "nsIFileURL fileURL" from nsIFilePicker, just use "nsISimpleEnumerator files"
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
NEW
People
(Reporter: sspitzer, Unassigned)
References
Details
>Why we need both mFile and mFiles? For backward compatibility?
see http://bugzilla.mozilla.org/show_bug.cgi?id=121122#c20
"I'll also log a cleanup bug on this:
readonly attribute nsILocalFile file;
readonly attribute nsISimpleEnumerator files;"
| Reporter | ||
Comment 1•23 years ago
|
||
readonly attribute nsILocalFile file;
readonly attribute nsIFileURL fileURL;
readonly attribute nsISimpleEnumerator files;
All weed need is:
nsISimpleEnumerator files;
if consumers need the nsILocalFile, they can QI.
if they need nsIFileURL, they can do:
+ var ioService = Components.classes["@mozilla.org/network/io-service;1"]
+ ioService = ioService.getService(Components.interfaces.nsIIOService);
+ var fileURL = ioService.newFileURI(file);
+ fileURL = fileURL.QueryInterface(Components.interfaces.nsIFileURL);
if they just need the spec:
+ var ioService = Components.classes["@mozilla.org/network/io-service;1"]
+ ioService = ioService.getService(Components.interfaces.nsIIOService);
+ var urlSpec = ioService.getURLSpecFromFile(file);
perhaps having a nsILocalFile firstFile would make sense, as a helper method.
all this comes about because of #121122 and modeOpenMultiple
Summary: remove "nsILocalFile file" and "nsIFileURL fileURL" from nsIFilePicker, just use files → remove "nsILocalFile file" and "nsIFileURL fileURL" from nsIFilePicker, just use "nsISimpleEnumerator files"
| Reporter | ||
Comment 2•23 years ago
|
||
I'll probably take this from pavlov.
pav, any objections?
Comment 3•23 years ago
|
||
Pav object to someone taking one of his bugs? It's never happen. Taking to
start the process of cleaning up nsIFilePicker
Assignee: pavlov → sdagley
Comment 4•23 years ago
|
||
see also bug 102013, about removing just the fileURL part.
I'd love to see this happen!
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2beta
Updated•23 years ago
|
Target Milestone: mozilla1.2beta → mozilla1.3alpha
Comment 5•23 years ago
|
||
Since I don't report into Internet Technologies anymore this bug needs a new
owner -> saari
Being somewhat overeager to rid my system of CFM builds I managed to nuke the
tree that had the work on this. All that's left is an old version of
nsFilePicker.cpp which had been overhauled for style consistency and to have the
pre-Carbon code partitioned in a cleaner manner. If whoever ends up with this
bug wants a copy of that let me know.
Assignee: sdagley → saari
Status: ASSIGNED → NEW
Comment 7•23 years ago
|
||
Taking for 1.4a. Let me know if we need it before then.
Status: NEW → ASSIGNED
Target Milestone: mozilla1.3alpha → mozilla1.4alpha
Comment 8•22 years ago
|
||
-> 1.4b, along with related bug.
Target Milestone: mozilla1.4alpha → mozilla1.5beta
Updated•16 years ago
|
Assignee: ccarlen → nobody
Status: ASSIGNED → NEW
OS: Windows 2000 → All
QA Contact: jrgmorrison → xptoolkit.widgets
Hardware: x86 → All
Target Milestone: mozilla1.5beta → ---
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•