From 6324e540fed2cdfc495039f2e964233e1cbefe52 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 4 Oct 2016 14:56:38 +0000 Subject: [PATCH] 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@12010 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Native_File_Chooser_MAC.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm index d09024d70..19ce2080a 100644 --- a/src/Fl_Native_File_Chooser_MAC.mm +++ b/src/Fl_Native_File_Chooser_MAC.mm @@ -583,7 +583,9 @@ int Fl_Native_File_Chooser::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 BROWSE_MULTI_FILE: [(NSOpenPanel*)_panel setAllowsMultipleSelection:YES]; @@ -601,7 +603,6 @@ int Fl_Native_File_Chooser::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) {