Closed Bug 34051 Opened 25 years ago Closed 24 years ago

use nsIFilePicker instead of nsIFileSpecWithUI in mailnews

Categories

(SeaMonkey :: MailNews: Message Display, defect, P2)

x86
All
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: sspitzer, Assigned: chuang)

References

Details

(Whiteboard: [nsbeta3+] fix in hand)

Attachments

(4 files)

/mailnews/addrbook/src/nsAddressBook.cpp, line 1301 -- nsCOMPtr<nsIFileSpecWithUI> fileSpec(getter_AddRefs(NS_CreateFileSpecWithUI())); /mailnews/addrbook/src/nsAddressBook.cpp, line 1306 -- rv = fileSpec->ChooseInputFile("Open File", nsIFileSpecWithUI::eAllFiles, nsnull, nsnull); /mailnews/addrbook/src/nsAddressBook.h, line 32 -- #include "nsIFileSpecWithUI.h" /mailnews/base/src/nsMessenger.cpp, line 30 -- #include "nsIFileSpecWithUI.h" /mailnews/base/src/nsMessenger.cpp, line 489 -- nsCOMPtr<nsIFileSpecWithUI> fileSpec; /mailnews/base/src/nsMessenger.cpp, line 542 -- nsIFileSpecWithUI::eAllFiles); /mailnews/compose/resources/content/MsgComposeCommands.js, line 857 -- filePicker = filePicker.QueryInterface(Components.interfaces.nsIFileSpecWithUI); /mailnews/import/resources/content/importDialog.js, line 432 -- filePicker = filePicker.QueryInterface( Components.interfaces.nsIFileSpecWithUI); /mailnews/import/resources/content/importDialog.js, line 505 -- filePicker = filePicker.QueryInterface( Components.interfaces.nsIFileSpecWithUI); /mailnews/import/resources/content/importDialog.js, line 596 -- filePicker = filePicker.QueryInterface( Components.interfaces.nsIFileSpecWithUI); pavlov, when will nsIFileSpecWithUI be depricated?
accepting. marking m17.
Status: NEW → ASSIGNED
Target Milestone: --- → M17
I saw putterman and jefft talking about this in #mozmail.
nominating for beta3... On Linux, the filepicker dialog used with nsIFilePicker is completely different than the one used with nsIFileSpecWithUI. We need these to be uniform.
Keywords: nsbeta3
Adding mail2 triage nomination keyword.
Keywords: mail2
Using the interface may cause localization problem. IQA, please test following dialogs in JA localized build. * Addressbook, mail import dialog. * Save attachment dialog. I checked briefly these dialog with PR2 Japanese on Japanese NT and did not see any problem.
I see one problem. My imported Address book (Japanese file name) does not show up correctly in the address book UI (list of addressbooks). I am not sure if this is related to this bug.
Blocks: 47551
continuing to use nsIFileSpecWithUI will cause l10n bugs, since the unix file picker used by nsIFileSpecWithUI is not at all l10nable.
No longer blocks: 47551
Blocks: 47552
Blocks: 47551
No longer blocks: 47552
After considerable discussion in the i18n/mail triage, this bug is now marked as nsbeta3-. We would like more information of the following type, however. 1. Are there specicifc problem in L10n caised by not doing this. 2. If so, we should file a specific bug to fix the problem.
Whiteboard: [nsbeta3-][Need more info]
i'm a bit confused here... how did this bug become an i18n/l10n issue? nsIFileSpecWithUI is *going away*. If mailnews continues to use these interfaces, I will have to comment out the code that uses them and none of their file pickers will work. As I don't really want to do this (since that would suck), It would be nice to have this fixed. nsIFileSpecWithUI uses a depriciated interface (nsIFileSpec), and uses nsIFileWidget which on unix is native and not localizable what-so-ever. They are both going away, so they should really get fixed :-)
Whiteboard: [nsbeta3-][Need more info]
reassign to tony since these are import dlgs + per mail triage
Assignee: sspitzer → tonyr
Status: ASSIGNED → NEW
Whiteboard: [nsbeta3+]
Target Milestone: M17 → M18
Keywords: mailtrack
This is a dup of 39036 for me. There is a patch/fix posted for that bug, I'm just need someone to review before I check it in.
Depends on: 39036
Tony, can you email someone on mailnewsstaff team to help review your fix?
Checked in fix for import dialog 8/31/2000.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reopening: saving an attachment seems to use nsIFileSpecWithUI. The code in question is in nsMessenger::SaveAttachment.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Blocks: 24731
Jeff Tsai, is the reopen problem yours then? Is the problem bad enough for users to be a P2? If not, this should already be a minus bug...
nsbeta3- would be fine.
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.
Okay, let me take this bug and change priority to P2 for the time being ....
Assignee: tonyr → jefft
Status: REOPENED → NEW
Priority: P3 → P2
Accepting
Status: NEW → ASSIGNED
Confirming the nsbeta3+, P2 on behalf of mailtriage. Please clear the status whiteboard when a bug is reopened.
Whiteboard: [nsbeta3+] → [nsbeta3+] Fix in hand ...
Attached patch a fixSplinter Review
Fix checked in. r=alecf
Status: ASSIGNED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Did a grep on all mailnews code and found out that there is an reference of nsIFileSpecWithUI in addrbook\src\nsAddressBook.[h,cpp]. Reopenning the bug....
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reassign to the owner of the code ....
Assignee: jefft → chuang
Status: REOPENED → NEW
The nsAddressBook.cpp/ImportAdddressBook() which contains nsIFileSpecWithUI is not used in the application(mozilla or commercial) at all. It is used before we have the import tool/wizard. I keep it for debugging use (good for debugging migrating address book). If it really need to be removed, please rtm++ it.
Whiteboard: [nsbeta3+] Fix in hand ... → [nsbeta3+]
No, don't even nominate this, I won't take it.
It does need to be removed so that nsIFileSpecWithUI can be removed from cvs to reduce bloat, etc... so if this isn't fixed, we're gonna be having a red tree for a while...
removing this code (or just if0'ing it out since its debug code) should be pretty trivial.
Candice, my impression was that you were saying we don't even build the offending code. Is that not true then? I could probably get approval to ifdef it away if that's what we need to do.
I just replaced nsIFileSpecWithUI with nsIFilePicker since I'm working in the same file. It didn't take me long to convert it. So I have fix in my tree. I can attach a patch but it will have fix for my other bug.
Whiteboard: [nsbeta3+] → [nsbeta3+] fix in hand
nsbeta3 has passed. Need to change the nsbeta3+ to a nsbeta3-.
removing mail2 keyword.
Keywords: mail2
r=sspitzer on the current patch. let's get rid of nsIFileSpecWithUI ASAP. there are going to be i18n problems with this code. nsILocalFile and the file picker are i18n safe, but getting the path (as a C string) and setting a nsFileSpec with it is going to do bad things if the user picks a file with japanese characters. adding momoi to the cc list. there should already be a bug on "import not working with japanese file names". I'll go try to find it. (also, adding patch keyword.)
Keywords: patch
I think #58109 is the import i18n bug.
Just to be clear on this patch, the function using nsIFilePicker in nsAddressBook.cpp is used for debugging purpose only. The fix for bug 58109 will be in mailnews/import.
sorry, my mistake. r=sspitzer on the patch. let's get rid of nsIFileSpecWithUI. fyi, eventuall nsFileSpec and nsIFileSpec are going to go away too.
sr=mscott
forget to mark fixed.
Status: NEW → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
QA Contact: lchiang → stephend
http://lxr.mozilla.org/seamonkey/search?string=nsIFileSpecWithUI+ comes up empty (for addressbook, that is). verified fixed.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: