Closed Bug 426680 Opened 17 years ago Closed 9 years ago

[10.5/Minefield] In Save window the file extension is selected when it shouldn't

Categories

(Core :: Widget: Cocoa, defect, P1)

All
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: rotis, Assigned: moz)

References

Details

(Whiteboard: tpi:+)

Attachments

(3 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9pre) Gecko/2008040204 Minefield/3.0pre When saving a photo, Minefield calls the OSX Save window. But there it should only select the file name for possible change, not the file extension with it. For example: Right: "filename".jpg Wrong: "filename.jpg" Minefield does it wrong, Firefox 2.0.0.13 does it right. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Confirming, as I see the difference between branch and the latest nightly as the reporter does. I compared it to what Safari does, but in Safari's case they don't add any extension to the file name when I try to save a jpg file from google images.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I would prefer to see the original file name when saving a file, not something manipulated like Safari does. For example: I save an image file from Flickr. It's name is usually something like "453637_673h34h3n_8o3.jpg". This is a crazy name, but with the extension ".jpg" I know it is an image file. If there only were "453637_673h34h3n_8o3" grandma Josephine Doe using Firefox might wonder what that means. Firefox 2.0.0.13 handles saving of files perfectly.
Assignee: nobody → joshmoz
Component: OS Integration → Widget: Cocoa
Product: Firefox → Core
QA Contact: os.integration → cocoa
(In reply to comment #3) > I compared it to what Safari does, but in Safari's case they > don't add any extension to the file name when I try to save a jpg file from > google images. Showing the extension probably depends on the state of your "Hide Extension" preferences (either globally or in Safari's save dialogue).
FF3 Final is coming June 17 and this bug introduced with FF3 will stay? No more comfortable image downloads due to FF's violating of MacOSX's 'human interface guidelines' (meaning the basic functions all programs should support). Since all the updates of a Firefox Final are just security fixes Mac users have to wait until 2009 when hopefully this FF3 bug might be fixed in FF4? Of course FF4 won't support PowerPC Macs anymore so all PPC Mac users who download a lot of images (from Flickr etc) are now stuck in FF2? Great! :-/
Flags: wanted1.9.0.x+
Priority: -- → P3
This bug is in FF3.0.x and 3.1 beta 3 on OSX. IT IS NOT IN FF2 on OSX. I don't know it that makes it a regression issue but thought it worth mentioning.
Assignee: joshmoz → nobody
This also applies to Firefox on Windows Vista (and probably Windows 7, although I haven't tested). I tried with 3.5.5, and the latest 3.6b4pre and 3.7a1pre nightlies, whatever they are at the time of this writing. Does anyone know if I'm supposed to file a separate bug report or what?
(In reply to comment #10) > This also applies to Firefox on Windows Vista (and probably Windows 7, although > I haven't tested). I tried with 3.5.5, and the latest 3.6b4pre and 3.7a1pre > nightlies, whatever they are at the time of this writing. Does anyone know if > I'm supposed to file a separate bug report or what? Since this bug is Mac-only, it'd be great if you'd file a new bug report. Thanks for looking into it!
(In reply to comment #11) Thank you for the reply, but unfortunately I misspoke. Although the extension portion of the file name is not selected when renaming files in Windows Explorer, it is selected in the Save As dialog of every other application -- including Internet Explorer. That suggests it may not be possible for developers to customize which portion of the file name is selected. Additionally, when a file name without an extension is entered and the Save button is pressed, the extension for the currently selected file type is automatically appended. That makes this a non-issue on Windows, or a minor cosmetic one at best. Thanks again, and I'll get out of your bug report now.
I was wondering, since the camino guys seem to have fixed this in https://bugzilla.mozilla.org/show_bug.cgi?id=576978 would it be possible to use the same fix here? Thank you very much.
Flags: needinfo?(twalker)
Priority: P3 → P1
Hardware: PowerPC → All
Whiteboard: tpi:+
Assignee: nobody → moz
Attached patch Patch v1 (obsolete) — Splinter Review
Only thing I'm not sure of is if all extensions should be allowed, especially for the case where no UTI matches the given extension.
Attachment #8772009 - Flags: review?(mstange)
Comment on attachment 8772009 [details] [diff] [review] Patch v1 Review of attachment 8772009 [details] [diff] [review]: ----------------------------------------------------------------- Not sure about your question, but this patch makes things strictly better so let's land it. ::: widget/cocoa/nsFilePicker.mm @@ +460,5 @@ > NSString* defaultFilename = [NSString stringWithCharacters:(const unichar*)inDefaultName.get() length:inDefaultName.Length()]; > > + // set up allowed types; this prevents the extension from being selected > + // use the UTI for the file type to allow alternate extensions (e.g., jpg vs. jpeg) > + NSString *extension = defaultFilename.pathExtension; star goes on the left
Attachment #8772009 - Flags: review?(mstange) → review+
The stars in that file are inconsistent, fwiw. :) I can change and resubmit, but might as well just fix it up on your end.
Re: my question: If the user changes the extension to something that doesn't match the type, it pops a dialog. E.g., if the type's extension is "foo" and they change it to "bar" it'll ask if they want to save as ".foo" or ".bar.foo".
(In reply to Wevah from comment #17) > The stars in that file are inconsistent, fwiw. :) > > I can change and resubmit, but might as well just fix it up on your end. If you submit a patch with user/commit message and set the checkin-needed keyword, the patch will be checked in to one of the integration repos. Then the patch will end up in mozilla-central when the integration repo is merged to mozilla-central.
Ah, cool. Thanks.
Moved the stars. Proposed commit message: Bug 426680 - Set allowedFileTypes on NSSavePanel so the file extension isn't selected.
Attachment #8772009 - Attachment is obsolete: true
Keywords: checkin-needed
Oh, user should be "Nate Weaver"; email address can either be the one here or with "mix" replaced with "wevah" (might be better).
Ugh, "mix" = "moz".
Sorry, when I said "patch with user/commit message I ment a changeset with a commit message. You can create a changeset by 'hg commit -m "Bug 426680 - Set allowedFileTypes on NSSavePanel so the file extension isn't selected. r=mstange." && hg export > mypatch.diff'. ('hg strip' will get rid of the commit)
Actually, never mind. I can push the patch to inbound for you :-)
Keywords: checkin-needed
Pushed by stefanh@inbox.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/666ed766fc72 Set allowedFileTypes on NSSavePanel so the file extension isn't selected. r=mstange.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
(In reply to Stefan [:stefanh] from comment #24) > Sorry, when I said "patch with user/commit message I ment a changeset with a > commit message. You can create a changeset by 'hg commit -m "Bug 426680 - > Set allowedFileTypes on NSSavePanel so the file extension isn't selected. > r=mstange." && hg export > mypatch.diff'. > > ('hg strip' will get rid of the commit) Oh, sorry! My fault. Thanks for checking this in!
Flags: needinfo?(twalker)
Depends on: 1320377
Depends on: 1321321
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: