Closed Bug 47553 Opened 24 years ago Closed 24 years ago

Change uses of nsIFileWidget to nsIFilePicker in nsEditorShell.cpp

Categories

(Core :: DOM: Editor, defect, P1)

x86
All
defect

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: pavlov, Assigned: sfraser_bugs)

References

Details

(Whiteboard: [nsbeta3-][rtm-][p:1])

Attachments

(2 files)

mozilla/editor/base/nsEditorShell.cpp uses nsIFileWidget which
will be removed towards the end of beta3.  Please change this code to use
nsIFilePicker instead.
Blocks: 47552
Keywords: correctness, nsbeta3
Blocks: 47551
No longer blocks: 47552
Simon had some good ideas for the required changes to make this conversion.
Assignee: cmanske → sfraser
cc ryan. Did you move all the code that requires file pickers from 
nsEditorShell.cpp to the JS?
The only code which has nsIFileWidget that I'll be touching is SaveDocument. 
I'm removing all UI-related code out of SaveDocument (which includes two uses 
of nsIFileWidget) and putting it in JS. There are other places outside of 
SaveDocument where nsIFileWidget is used that I will not be touching. I'll make 
sure to use nsIFilePicker in my JS.
Setting to nsbeta3+

Ryan & Simon -- what's left on this bug?
Whiteboard: [nsbeta3+]
The only function that use nsIFileWidget and that needs to be changed are as 
follows:

nsEditorShell::GetLocalFileURL(nsIDOMWindow *parent, const PRUnichar 
*filterType, PRUnichar **_retval) (2 instances)

There is also #include "nsIFileWidget.h" that may be removed. As I said 
earlier, the 2 instances of nsIFileWidget in SaveDocument don't need to be 
worried about, those will be removed by me.
There's a bunch of work here, like make nsDiskDocument use nsIFile. I'll do this.
Status: NEW → ASSIGNED
setting the milestone
Target Milestone: --- → M18
Whiteboard: [nsbeta3+] → [nsbeta3+][p:3]
I already report to bug 39234 and attach proposed patch.
Attached patch a patchSplinter Review
need to move this one over to m19
Whiteboard: [nsbeta3+][p:3] → [nsbeta3-][p:3]
Target Milestone: M18 → M19
*** Bug 39234 has been marked as a duplicate of this bug. ***
there is a patch on here, why are you moving this out?  we need this for beta3
so that everyone is using the same file picker.  the old file picker has
numerous bugs.  Please review this patch and check it in.  thanks for the patch
Makoto.
Keywords: patch
Whiteboard: [nsbeta3-][p:3] → [p:3]
Pav is anxious to get rid of the old filepicker code once all callers are
upgraded, which will allow us to get rid of some completely wasteful bloat.
we are currently resource constrained and have higher level issues to address 
before b3, setting this to m19 so the patch can be reviewed properly with the 
appropriate testing.
Whiteboard: [p:3] → [nsbeta3-][p:3]
I have the changes in my tree.
Whiteboard: [nsbeta3-][p:3] → [nsbeta3-][p:3]fix in hand
The patch does not work on Mac, because the conversion from nsLocalFile to 
nsFileSpec, via nsFilePath, does not work. In addition, nsLocalFileMac has bugs 
which prevent alternative conversion paths.
Depends on: 51932
Whiteboard: [nsbeta3-][p:3]fix in hand → [nsbeta3-][p:3]
setting to rtm+/p1 per review with bij and beppe
Severity: normal → major
Keywords: rtm
Priority: P3 → P1
Whiteboard: [nsbeta3-][p:3] → [nsbeta3-][rtm+][p:1]
Simon, please include the required information per the rtm checkin rules
Whiteboard: [nsbeta3-][rtm+][p:1] → [nsbeta3-][rtm+ NEED INFO][p:1]
PDT would like to know why this is so critical.  Thanks.
if this bug is not fixed, we will have 2 different file pickers, which will
confuse the users a great deal, espically on linux.  the old file picker does
not behave properly in many cases, nor does it support things like filtering on
linux or mac.  I think that is very important and needs to be fixed.
This bug is blocked by bug 51932.
PDT marking [rtm-] because the downside of not fixing doesn't sound like P1
Whiteboard: [nsbeta3-][rtm+ NEED INFO][p:1] → [nsbeta3-][rtm-][p:1]
moving to future
Target Milestone: M19 → Future
Blocks: 55389
Attached patch new patchSplinter Review
I cannot test on MacOS since I have no Mac build env.
please, does anyone test on Mac.
Makoto Kato: how is that last patch different? Does it resolve the Mac OS file 
spec conversion problems?
*** Bug 53533 has been marked as a duplicate of this bug. ***
Target Milestone: Future → mozilla0.9
Gotta get this done for embedding too.
*** Bug 60934 has been marked as a duplicate of this bug. ***
I've put a nsFileSpec -> nsIFile patch in bug 62567.
See http://bugzilla.mozilla.org/showattachment.cgi?attach_id=21020

That subsumes these patches.
Depends on: 62567
Fix checked in. Testing should cover open/save of files in Composer, and opening 
of image files in the image dialog, checking that the file filters are working 
properly.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Simon, can you verify this one...thanks!
sujay: did you do the testing that I described in the penultimate comment? If 
that all works, you can verify this.
Yes I did the testing which involved opening/saving of files in Composer, and
opening of image files in the image dialog, checking that the file filters are
working properly.

marking verified...
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: