Fix deprecation warning
* src/nsterm.m (ns_term_init): Use writeToFile or writeToURL as required.
This commit is contained in:
parent
7946445962
commit
9ad0f1d15c
1 changed files with 15 additions and 1 deletions
16
src/nsterm.m
16
src/nsterm.m
|
@ -5193,7 +5193,21 @@ Needs to be here because ns_initialize_display_info () uses AppKit classes.
|
|||
alpha: 1.0]
|
||||
forKey: [NSString stringWithUTF8String: name]];
|
||||
}
|
||||
[cl writeToFile: nil];
|
||||
|
||||
/* FIXME: Report any errors writing the color file below. */
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
|
||||
if ([cl respondsToSelector:@selector(writeToURL:error:)])
|
||||
#endif
|
||||
[cl writeToURL:nil error:nil];
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
|
||||
else
|
||||
#endif
|
||||
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 */
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100 \
|
||||
|| defined (NS_IMPL_GNUSTEP)
|
||||
[cl writeToFile: nil];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue