diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Native_File_Chooser_MAC.mm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm index 9f0a732bd..d09024d70 100644 --- a/src/Fl_Native_File_Chooser_MAC.mm +++ b/src/Fl_Native_File_Chooser_MAC.mm @@ -346,7 +346,7 @@ int Fl_Native_File_Chooser::get_saveas_basename(void) { char *q = strdup( [[[(NSSavePanel*)_panel URL] path] UTF8String] ); if ( !(_options & SAVEAS_CONFIRM) ) { const char *d = [[[[(NSSavePanel*)_panel URL] path] stringByDeletingLastPathComponent] UTF8String]; - int l = strlen(d) + 1; + int l = (int)strlen(d) + 1; if (strcmp(d, "/") == 0) l = 1; int lu = strlen(UNLIKELYPREFIX); // Remove UNLIKELYPREFIX between directory and filename parts @@ -532,7 +532,7 @@ int Fl_Native_File_Chooser::runmodal() NSString *dir = nil; NSString *fname = nil; NSString *preset = nil; - int retval; + NSInteger retval; if (_preset_file) { preset = [[NSString alloc] initWithUTF8String:_preset_file]; if (strchr(_preset_file, '/') != NULL) { @@ -551,7 +551,7 @@ int Fl_Native_File_Chooser::runmodal() } [dir release]; [preset release]; - return retval; + return (retval == NSFileHandlingPanelOKButton ? 1 : 0); } // POST BROWSER @@ -637,13 +637,13 @@ int Fl_Native_File_Chooser::post() { } int retval = runmodal(); if (_filt_total) { - _filt_value = [popup indexOfSelectedItem]; + _filt_value = (int)[popup indexOfSelectedItem]; } - if ( retval == NSOKButton ) { + if ( retval == 1 ) { if (is_open_panel) { clear_pathnames(); NSArray *array = [(NSOpenPanel*)_panel URLs]; - _tpathnames = [array count]; + _tpathnames = (int)[array count]; _pathnames = new char*[_tpathnames]; for(int i = 0; i < _tpathnames; i++) { _pathnames[i] = strnew([[(NSURL*)[array objectAtIndex:i] path] UTF8String]); @@ -653,7 +653,7 @@ int Fl_Native_File_Chooser::post() { } [key makeKeyWindow]; [localPool release]; - return (retval == NSOKButton ? 0 : 1); + return (retval == 1 ? 0 : 1); } #endif // __APPLE__ |
