diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2011-07-08 12:04:23 +0200 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2011-07-08 12:04:23 +0200 |
commit | 4393663bc52fc24c15aa9c1779dfc23d3a0f901f (patch) | |
tree | ac7c3b0fd0cf38005423465b7779da4ed2c3bb87 /src/nsselect.m | |
parent | 2287ac9896c30303d7f469a3e5cb348fbbbd9e23 (diff) | |
download | emacs-4393663bc52fc24c15aa9c1779dfc23d3a0f901f.tar.gz |
Fix warnings in ns*m files: Replace deprecated methods, declare new interfaces.
* emacs.c: Declare unexec_init_emacs_zone.
* nsfns.m (check_ns_display_info): Cast to long and use %ld in error
to avoid warning.
* nsimage.m (allocInitFromFile): Don't use deprecated method
bestRepresentationForDevice on OSX >= 10.6.
* nsmenu.m (fillWithWidgetValue): Don't use depercated method
sizeToFit on OSX >= 10.2.
* nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
cString and lossyCString on OSX >= 10.4
* nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
(MAC_OS_X_VERSION_10_5): Define if not defined.
(EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
(EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
(EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
* nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
variable firstTime not needed on OSX >= 10.6.
(setPosition): setFloatValue:knobProportion: is deprecated on OSX
>= 10.5. Use setKnobProportion, setDoubleValue.
Diffstat (limited to 'src/nsselect.m')
-rw-r--r-- | src/nsselect.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nsselect.m b/src/nsselect.m index aeb2a3e3a99..867cf3252e5 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -352,16 +352,22 @@ ns_string_from_pasteboard (id pb) utfStr = [mstr UTF8String]; length = [mstr lengthOfBytesUsingEncoding: NSUTF8StringEncoding]; +#if ! defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4 if (!utfStr) { utfStr = [mstr cString]; length = strlen (utfStr); } +#endif } NS_HANDLER { message1 ("ns_string_from_pasteboard: UTF8String failed\n"); +#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 + utfStr = "Conversion failed"; +#else utfStr = [str lossyCString]; +#endif length = strlen (utfStr); } NS_ENDHANDLER |