提交 676fd12a 编写于 作者: B bagiras

8013553: [macosx] java.awt.FileDialog removes file extensions

Reviewed-by: leonidr, serb
上级 374b0360
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -93,6 +93,14 @@ canChooseDirectories:(BOOL)inChooseDirectories
- (void)safeSaveOrLoad {
NSSavePanel *thePanel = nil;
/*
* 8013553: turns off extension hiding for the native file dialog.
* This way is used because setExtensionHidden(NO) doesn't work
* as expected.
*/
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setBool:NO forKey:@"NSNavLastUserSetHideExtensionButtonState"];
if (fMode == java_awt_FileDialog_SAVE) {
thePanel = [NSSavePanel savePanel];
[thePanel setAllowsOtherFileTypes:YES];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册