diff options
| author | Manolo Gouy <Manolo> | 2015-05-04 17:00:46 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2015-05-04 17:00:46 +0000 |
| commit | 0e633c487298d3bf7e1163e00785456ae6e0637b (patch) | |
| tree | 211f5f8af90edd22ce93bd93002c468ad15881ee /src/Fl_Native_File_Chooser_MAC.mm | |
| parent | 626b8ef596370e918580307ff7ac6afc0feb8953 (diff) | |
Removed deprecation and implicit cast warnings.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10729 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Native_File_Chooser_MAC.mm')
| -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__ |
