Bug 1320377 - Allow users to change file extension in the Save dialog. r=mstange.
authorstefanh@inbox.com
Mon, 28 Nov 2016 18:04:55 +0100
changeset 324465 d5ffc2a28d39c6274a639d002006216c0b668677
parent 324464 f5624a5ba41e1f690b1a6ffb9d50beee80ef3bcc
child 324466 125e6fb37319d4767df61d82af7014094163dccb
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersmstange
bugs1320377
milestone53.0a1
Bug 1320377 - Allow users to change file extension in the Save dialog. r=mstange.
widget/cocoa/nsFilePicker.mm
--- a/widget/cocoa/nsFilePicker.mm
+++ b/widget/cocoa/nsFilePicker.mm
@@ -467,16 +467,18 @@ nsFilePicker::PutLocalFile(const nsStrin
     if (type) {
       thePanel.allowedFileTypes = @[(NSString*)type];
       CFRelease(type);
     } else {
       // if there's no UTI for the file extension, use the extension itself.
       thePanel.allowedFileTypes = @[extension];
     }
   }
+  // Allow users to change the extension.
+  thePanel.allowsOtherFileTypes = YES;
 
   // set up default directory
   NSString *theDir = PanelDefaultDirectory();
   if (theDir) {
     [thePanel setDirectoryURL:[NSURL fileURLWithPath:theDir isDirectory:YES]];
   }
 
   // load the panel