diff options
| author | Jan Djärv | 2012-10-07 12:07:23 +0200 |
|---|---|---|
| committer | Jan Djärv | 2012-10-07 12:07:23 +0200 |
| commit | 335f5ae44485d32ac632bd8d27d5ac00acd63477 (patch) | |
| tree | 0d025e64c7afa71788dab08ddbd7bf055ad2f2aa /src | |
| parent | 3bc0a2f7e99de90d469b55fcfc9f3f82a99eb0b9 (diff) | |
| download | emacs-335f5ae44485d32ac632bd8d27d5ac00acd63477.tar.gz emacs-335f5ae44485d32ac632bd8d27d5ac00acd63477.zip | |
Check for OSX >= 10.4 to match what the maunal says and what we actually support.
* configure.ac: Check that OSX is 10.4 or newer.
* etc/NEWS (NextStep/OSX port changes): OSX 10.4 or newer is required.
* src/nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
(ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
* src/nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
* src/nsmenu.m (fillWithWidgetValue:): Remove code for < MAC_OS_X_VERSION_10_2.
* src/nsselect.m (ns_string_from_pasteboard): Remove check for >=
MAC_OS_X_VERSION_10_4.
* src/nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
(EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
(struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 18 | ||||
| -rw-r--r-- | src/nsfns.m | 35 | ||||
| -rw-r--r-- | src/nsimage.m | 8 | ||||
| -rw-r--r-- | src/nsmenu.m | 5 | ||||
| -rw-r--r-- | src/nsselect.m | 4 | ||||
| -rw-r--r-- | src/nsterm.h | 13 | ||||
| -rw-r--r-- | src/nsterm.m | 5 |
7 files changed, 44 insertions, 44 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 44dc7286278..45e3c8a8a57 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,23 @@ | |||
| 1 | 2012-10-07 Jan Djärv <jan.h.d@swipnet.se> | 1 | 2012-10-07 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 2 | ||
| 3 | * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of | ||
| 4 | MAC_OS_X_VERSION_10_6. | ||
| 5 | (syms_of_nsterm): Remove comment about Panther and above for ns-antialias-text. | ||
| 6 | |||
| 7 | * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove. | ||
| 8 | (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4. | ||
| 9 | (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3. | ||
| 10 | |||
| 11 | * nsselect.m (ns_string_from_pasteboard): Remove check for >= | ||
| 12 | MAC_OS_X_VERSION_10_4. | ||
| 13 | |||
| 14 | * nsmenu.m (fillWithWidgetValue:): Remove code for < MAC_OS_X_VERSION_10_2. | ||
| 15 | |||
| 16 | * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger. | ||
| 17 | |||
| 18 | * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4. | ||
| 19 | (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4. | ||
| 20 | |||
| 3 | * nsterm.m (ns_in_resize): Remove (Bug#12479). | 21 | * nsterm.m (ns_in_resize): Remove (Bug#12479). |
| 4 | (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove. | 22 | (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove. |
| 5 | (ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove ns_in_resize | 23 | (ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove ns_in_resize |
diff --git a/src/nsfns.m b/src/nsfns.m index d66b1c32b07..7a22ac547c3 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -1949,32 +1949,29 @@ DEFUN ("ns-list-services", Fns_list_services, Sns_list_services, 0, 0, 0, | |||
| 1949 | 1949 | ||
| 1950 | check_ns (); | 1950 | check_ns (); |
| 1951 | svcs = [[NSMenu alloc] initWithTitle: @"Services"]; | 1951 | svcs = [[NSMenu alloc] initWithTitle: @"Services"]; |
| 1952 | [NSApp setServicesMenu: svcs]; /* this and next rebuild on <10.4 */ | 1952 | [NSApp setServicesMenu: svcs]; |
| 1953 | [NSApp registerServicesMenuSendTypes: ns_send_types | 1953 | [NSApp registerServicesMenuSendTypes: ns_send_types |
| 1954 | returnTypes: ns_return_types]; | 1954 | returnTypes: ns_return_types]; |
| 1955 | 1955 | ||
| 1956 | /* On Tiger, services menu updating was made lazier (waits for user to | 1956 | /* On Tiger, services menu updating was made lazier (waits for user to |
| 1957 | actually click on the menu), so we have to force things along: */ | 1957 | actually click on the menu), so we have to force things along: */ |
| 1958 | #ifdef NS_IMPL_COCOA | 1958 | #ifdef NS_IMPL_COCOA |
| 1959 | if (NSAppKitVersionNumber >= 744.0) | 1959 | delegate = [svcs delegate]; |
| 1960 | if (delegate != nil) | ||
| 1960 | { | 1961 | { |
| 1961 | delegate = [svcs delegate]; | 1962 | if ([delegate respondsToSelector: @selector (menuNeedsUpdate:)]) |
| 1962 | if (delegate != nil) | 1963 | [delegate menuNeedsUpdate: svcs]; |
| 1964 | if ([delegate respondsToSelector: | ||
| 1965 | @selector (menu:updateItem:atIndex:shouldCancel:)]) | ||
| 1963 | { | 1966 | { |
| 1964 | if ([delegate respondsToSelector: @selector (menuNeedsUpdate:)]) | 1967 | int i, len = [delegate numberOfItemsInMenu: svcs]; |
| 1965 | [delegate menuNeedsUpdate: svcs]; | 1968 | for (i =0; i<len; i++) |
| 1966 | if ([delegate respondsToSelector: | 1969 | [svcs addItemWithTitle: @"" action: NULL keyEquivalent: @""]; |
| 1967 | @selector (menu:updateItem:atIndex:shouldCancel:)]) | 1970 | for (i =0; i<len; i++) |
| 1968 | { | 1971 | if (![delegate menu: svcs |
| 1969 | int i, len = [delegate numberOfItemsInMenu: svcs]; | 1972 | updateItem: (NSMenuItem *)[svcs itemAtIndex: i] |
| 1970 | for (i =0; i<len; i++) | 1973 | atIndex: i shouldCancel: NO]) |
| 1971 | [svcs addItemWithTitle: @"" action: NULL keyEquivalent: @""]; | 1974 | break; |
| 1972 | for (i =0; i<len; i++) | ||
| 1973 | if (![delegate menu: svcs | ||
| 1974 | updateItem: (NSMenuItem *)[svcs itemAtIndex: i] | ||
| 1975 | atIndex: i shouldCancel: NO]) | ||
| 1976 | break; | ||
| 1977 | } | ||
| 1978 | } | 1975 | } |
| 1979 | } | 1976 | } |
| 1980 | #endif | 1977 | #endif |
| @@ -2075,7 +2072,7 @@ ns_do_applescript (Lisp_Object script, Lisp_Object *result) | |||
| 2075 | *result = Qt; | 2072 | *result = Qt; |
| 2076 | // script returned an AppleScript result | 2073 | // script returned an AppleScript result |
| 2077 | if ((typeUnicodeText == [returnDescriptor descriptorType]) || | 2074 | if ((typeUnicodeText == [returnDescriptor descriptorType]) || |
| 2078 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 | 2075 | #if defined (NS_IMPL_COCOA) |
| 2079 | (typeUTF16ExternalRepresentation | 2076 | (typeUTF16ExternalRepresentation |
| 2080 | == [returnDescriptor descriptorType]) || | 2077 | == [returnDescriptor descriptorType]) || |
| 2081 | #endif | 2078 | #endif |
diff --git a/src/nsimage.m b/src/nsimage.m index 370cf832c7c..884c0763fd4 100644 --- a/src/nsimage.m +++ b/src/nsimage.m | |||
| @@ -403,7 +403,6 @@ static EmacsImage *ImageList = nil; | |||
| 403 | if ([rep respondsToSelector: @selector (getBitmapDataPlanes:)]) | 403 | if ([rep respondsToSelector: @selector (getBitmapDataPlanes:)]) |
| 404 | { | 404 | { |
| 405 | bmRep = (NSBitmapImageRep *) rep; | 405 | bmRep = (NSBitmapImageRep *) rep; |
| 406 | onTiger = [bmRep respondsToSelector: @selector (colorAtX:y:)]; | ||
| 407 | 406 | ||
| 408 | if ([bmRep numberOfPlanes] >= 3) | 407 | if ([bmRep numberOfPlanes] >= 3) |
| 409 | [bmRep getBitmapDataPlanes: pixmapData]; | 408 | [bmRep getBitmapDataPlanes: pixmapData]; |
| @@ -435,7 +434,7 @@ static EmacsImage *ImageList = nil; | |||
| 435 | | (pixmapData[0][loc] << 16) | (pixmapData[1][loc] << 8) | 434 | | (pixmapData[0][loc] << 16) | (pixmapData[1][loc] << 8) |
| 436 | | (pixmapData[2][loc]); | 435 | | (pixmapData[2][loc]); |
| 437 | } | 436 | } |
| 438 | else if (onTiger) | 437 | else |
| 439 | { | 438 | { |
| 440 | NSColor *color = [bmRep colorAtX: x y: y]; | 439 | NSColor *color = [bmRep colorAtX: x y: y]; |
| 441 | CGFloat r, g, b, a; | 440 | CGFloat r, g, b, a; |
| @@ -445,7 +444,6 @@ static EmacsImage *ImageList = nil; | |||
| 445 | | ((int)(b * 255.0)); | 444 | | ((int)(b * 255.0)); |
| 446 | 445 | ||
| 447 | } | 446 | } |
| 448 | return 0; | ||
| 449 | } | 447 | } |
| 450 | 448 | ||
| 451 | - (void) setPixelAtX: (int)x Y: (int)y toRed: (unsigned char)r | 449 | - (void) setPixelAtX: (int)x Y: (int)y toRed: (unsigned char)r |
| @@ -463,7 +461,7 @@ static EmacsImage *ImageList = nil; | |||
| 463 | pixmapData[2][loc] = b; | 461 | pixmapData[2][loc] = b; |
| 464 | pixmapData[3][loc] = a; | 462 | pixmapData[3][loc] = a; |
| 465 | } | 463 | } |
| 466 | else if (onTiger) | 464 | else |
| 467 | { | 465 | { |
| 468 | [bmRep setColor: | 466 | [bmRep setColor: |
| 469 | [NSColor colorWithCalibratedRed: (r/255.0) green: (g/255.0) | 467 | [NSColor colorWithCalibratedRed: (r/255.0) green: (g/255.0) |
| @@ -483,7 +481,7 @@ static EmacsImage *ImageList = nil; | |||
| 483 | 481 | ||
| 484 | pixmapData[3][loc] = a; | 482 | pixmapData[3][loc] = a; |
| 485 | } | 483 | } |
| 486 | else if (onTiger) | 484 | else |
| 487 | { | 485 | { |
| 488 | NSColor *color = [bmRep colorAtX: x y: y]; | 486 | NSColor *color = [bmRep colorAtX: x y: y]; |
| 489 | color = [color colorWithAlphaComponent: (a / 255.0)]; | 487 | color = [color colorWithAlphaComponent: (a / 255.0)]; |
diff --git a/src/nsmenu.m b/src/nsmenu.m index b60cc005c5f..9af732c6c45 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -722,11 +722,6 @@ extern NSString *NSMenuDidBeginTrackingNotification; | |||
| 722 | #ifdef NS_IMPL_GNUSTEP | 722 | #ifdef NS_IMPL_GNUSTEP |
| 723 | if ([[self window] isVisible]) | 723 | if ([[self window] isVisible]) |
| 724 | [self sizeToFit]; | 724 | [self sizeToFit]; |
| 725 | #else | ||
| 726 | #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2 | ||
| 727 | if ([self supermenu] == nil) | ||
| 728 | [self sizeToFit]; | ||
| 729 | #endif | ||
| 730 | #endif | 725 | #endif |
| 731 | } | 726 | } |
| 732 | 727 | ||
diff --git a/src/nsselect.m b/src/nsselect.m index 95bc1a95957..c0c412c6fb2 100644 --- a/src/nsselect.m +++ b/src/nsselect.m | |||
| @@ -295,7 +295,7 @@ ns_string_from_pasteboard (id pb) | |||
| 295 | utfStr = [mstr UTF8String]; | 295 | utfStr = [mstr UTF8String]; |
| 296 | length = [mstr lengthOfBytesUsingEncoding: NSUTF8StringEncoding]; | 296 | length = [mstr lengthOfBytesUsingEncoding: NSUTF8StringEncoding]; |
| 297 | 297 | ||
| 298 | #if ! defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4 | 298 | #if ! defined (NS_IMPL_COCOA) |
| 299 | if (!utfStr) | 299 | if (!utfStr) |
| 300 | { | 300 | { |
| 301 | utfStr = [mstr cString]; | 301 | utfStr = [mstr cString]; |
| @@ -306,7 +306,7 @@ ns_string_from_pasteboard (id pb) | |||
| 306 | NS_HANDLER | 306 | NS_HANDLER |
| 307 | { | 307 | { |
| 308 | message1 ("ns_string_from_pasteboard: UTF8String failed\n"); | 308 | message1 ("ns_string_from_pasteboard: UTF8String failed\n"); |
| 309 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 | 309 | #if defined (NS_IMPL_COCOA) |
| 310 | utfStr = "Conversion failed"; | 310 | utfStr = "Conversion failed"; |
| 311 | #else | 311 | #else |
| 312 | utfStr = [str lossyCString]; | 312 | utfStr = [str lossyCString]; |
diff --git a/src/nsterm.h b/src/nsterm.h index f1cd7458bdc..958d1ce7853 100644 --- a/src/nsterm.h +++ b/src/nsterm.h | |||
| @@ -26,9 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | #ifdef HAVE_NS | 26 | #ifdef HAVE_NS |
| 27 | 27 | ||
| 28 | #ifdef NS_IMPL_COCOA | 28 | #ifdef NS_IMPL_COCOA |
| 29 | #ifndef MAC_OS_X_VERSION_10_3 | ||
| 30 | #define MAC_OS_X_VERSION_10_3 1030 | ||
| 31 | #endif | ||
| 32 | #ifndef MAC_OS_X_VERSION_10_4 | 29 | #ifndef MAC_OS_X_VERSION_10_4 |
| 33 | #define MAC_OS_X_VERSION_10_4 1040 | 30 | #define MAC_OS_X_VERSION_10_4 1040 |
| 34 | #endif | 31 | #endif |
| @@ -286,7 +283,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 286 | int refCount; | 283 | int refCount; |
| 287 | NSBitmapImageRep *bmRep; /* used for accessing pixel data */ | 284 | NSBitmapImageRep *bmRep; /* used for accessing pixel data */ |
| 288 | unsigned char *pixmapData[5]; /* shortcut to access pixel data */ | 285 | unsigned char *pixmapData[5]; /* shortcut to access pixel data */ |
| 289 | BOOL onTiger; | ||
| 290 | NSColor *stippleMask; | 286 | NSColor *stippleMask; |
| 291 | } | 287 | } |
| 292 | + allocInitFromFile: (Lisp_Object)file; | 288 | + allocInitFromFile: (Lisp_Object)file; |
| @@ -355,7 +351,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 355 | 351 | ||
| 356 | /* ========================================================================== | 352 | /* ========================================================================== |
| 357 | 353 | ||
| 358 | Rendering on Panther and above | 354 | Rendering |
| 359 | 355 | ||
| 360 | ========================================================================== */ | 356 | ========================================================================== */ |
| 361 | 357 | ||
| @@ -380,7 +376,7 @@ extern NSString *ns_app_name; | |||
| 380 | extern EmacsMenu *mainMenu, *svcsMenu, *dockMenu; | 376 | extern EmacsMenu *mainMenu, *svcsMenu, *dockMenu; |
| 381 | 377 | ||
| 382 | /* Apple removed the declaration, but kept the implementation */ | 378 | /* Apple removed the declaration, but kept the implementation */ |
| 383 | #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 | 379 | #if defined (NS_IMPL_COCOA) |
| 384 | @interface NSApplication (EmacsApp) | 380 | @interface NSApplication (EmacsApp) |
| 385 | - (void)setAppleMenu: (NSMenu *)menu; | 381 | - (void)setAppleMenu: (NSMenu *)menu; |
| 386 | @end | 382 | @end |
| @@ -483,10 +479,9 @@ struct nsfont_info | |||
| 483 | float size; | 479 | float size; |
| 484 | #ifdef __OBJC__ | 480 | #ifdef __OBJC__ |
| 485 | NSFont *nsfont; | 481 | NSFont *nsfont; |
| 486 | /* cgfont and synthItal are used only on OS X 10.3+ */ | 482 | #if defined (NS_IMPL_COCOA) |
| 487 | #if defined (NS_IMPL_COCOA) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3) | ||
| 488 | CGFontRef cgfont; | 483 | CGFontRef cgfont; |
| 489 | #else /* GNUstep or OS X < 10.3 */ | 484 | #else /* GNUstep */ |
| 490 | void *cgfont; | 485 | void *cgfont; |
| 491 | #endif | 486 | #endif |
| 492 | #else /* ! OBJC */ | 487 | #else /* ! OBJC */ |
diff --git a/src/nsterm.m b/src/nsterm.m index 75f33fea75e..d6689c08aa2 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -569,9 +569,6 @@ ns_menu_bar_should_be_hidden (void) | |||
| 569 | static void | 569 | static void |
| 570 | ns_update_auto_hide_menu_bar (void) | 570 | ns_update_auto_hide_menu_bar (void) |
| 571 | { | 571 | { |
| 572 | #ifndef MAC_OS_X_VERSION_10_6 | ||
| 573 | #define MAC_OS_X_VERSION_10_6 1060 | ||
| 574 | #endif | ||
| 575 | #ifdef NS_IMPL_COCOA | 572 | #ifdef NS_IMPL_COCOA |
| 576 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 | 573 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 |
| 577 | block_input (); | 574 | block_input (); |
| @@ -7087,7 +7084,7 @@ allowing it to be used at a lower level for accented character entry."); | |||
| 7087 | ns_function_modifier = Qnone; | 7084 | ns_function_modifier = Qnone; |
| 7088 | 7085 | ||
| 7089 | DEFVAR_LISP ("ns-antialias-text", ns_antialias_text, | 7086 | DEFVAR_LISP ("ns-antialias-text", ns_antialias_text, |
| 7090 | "Non-nil (the default) means to render text antialiased. Only has an effect on OS X Panther and above."); | 7087 | "Non-nil (the default) means to render text antialiased."); |
| 7091 | ns_antialias_text = Qt; | 7088 | ns_antialias_text = Qt; |
| 7092 | 7089 | ||
| 7093 | DEFVAR_LISP ("ns-confirm-quit", ns_confirm_quit, | 7090 | DEFVAR_LISP ("ns-confirm-quit", ns_confirm_quit, |