summaryrefslogtreecommitdiff
path: root/src/Fl_Native_File_Chooser_MAC.mm
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-10-04 15:00:34 +0000
committerManolo Gouy <Manolo>2016-10-04 15:00:34 +0000
commit1929cb109ec17f8d8a97d63dc4cb8520007c9cd9 (patch)
tree944aee66a9f86b339165e732fbd2c8ceca8c8312 /src/Fl_Native_File_Chooser_MAC.mm
parent31070778b7c7d32e90931f52dbafefddcb2db74d (diff)
Improve Fl_Native_File_Chooser open dialog under Mac OS 10.12 that had lost its titlebar message.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12011 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Native_File_Chooser_MAC.mm')
-rw-r--r--src/Fl_Native_File_Chooser_MAC.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm
index aa4998e20..585d14fa7 100644
--- a/src/Fl_Native_File_Chooser_MAC.mm
+++ b/src/Fl_Native_File_Chooser_MAC.mm
@@ -643,7 +643,9 @@ int Fl_Quartz_Native_File_Chooser_Driver::post() {
break;
}
NSString *nstitle = [NSString stringWithUTF8String: (_title ? _title : "No Title")];
- [(NSSavePanel*)_panel setTitle:nstitle];
+ BOOL is_open_panel = [(NSSavePanel*)_panel isKindOfClass:[NSOpenPanel class]];
+ if (is_open_panel && fl_mac_os_version >= 101200 ) [(NSOpenPanel*)_panel setMessage:nstitle]; // 10.3
+ else [(NSSavePanel*)_panel setTitle:nstitle];
switch (_btype) {
case Fl_Native_File_Chooser::BROWSE_MULTI_FILE:
[(NSOpenPanel*)_panel setAllowsMultipleSelection:YES];
@@ -661,7 +663,6 @@ int Fl_Quartz_Native_File_Chooser_Driver::post() {
// SHOW THE DIALOG
NSWindow *key = [NSApp keyWindow];
- BOOL is_open_panel = [(NSSavePanel*)_panel isKindOfClass:[NSOpenPanel class]];
NSPopUpButton *popup = nil;
if ( is_open_panel ) {
if (_filt_total) {