All users were logged out of Bugzilla on October 13th, 2018

Default filename not used in non-save mode on Mac

RESOLVED FIXED in mozilla1.9.2a1

Status

()

--
major
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

Trunk
mozilla1.9.2a1
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
See bug 374011 comment 87.  I looked at the cocoa nsFilePicker.mm, and it doesn't use the default filename provided in modes other than "save".  It should, to actually implement the nsIFilePicker API.
(Assignee)

Comment 1

10 years ago
Created attachment 355746 [details] [diff] [review]
Somewhat like this

The only problem is that this still doesn't make the file show up when I do the Cmd-Shift-G thing to bring up a textfield to type in.  Is there a way to do that?
Attachment #355746 - Flags: superreview?(roc)
Attachment #355746 - Flags: review?(joshmoz)
Attachment #355746 - Flags: superreview?(roc) → superreview+

Comment 2

10 years ago
Comment on attachment 355746 [details] [diff] [review]
Somewhat like this

>+  // set up default file name
>+  NSString* defaultFilename = [NSString stringWithCharacters:(const unichar*)inDefaultName.get() length:inDefaultName.Length()];

"stringWithCharacters:length:" documentation: "Important: Raises an exception if chars is NULL, even if length is 0."

Gotta null check that. That is also not null-checked in "nsFilePicker::PutLocalFile", please fix that instance as well.
Attachment #355746 - Flags: review?(joshmoz) → review-

Comment 3

10 years ago
I guess that can't be null, never mind.

Updated

10 years ago
Attachment #355746 - Flags: review- → review+
(Assignee)

Comment 4

10 years ago
Pushed http://hg.mozilla.org/mozilla-central/rev/5e45ba40a88a

Resolving, but if we can make my question from comment 1 work too, that would be nice.
Assignee: joshmoz → bzbarsky
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
(Assignee)

Updated

10 years ago
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.