aboutsummaryrefslogtreecommitdiffstats
path: root/src/nsmenu.m
diff options
context:
space:
mode:
authorAlan Third2016-08-18 19:55:52 +0100
committerAlan Third2016-08-24 19:21:56 +0100
commit5332857670eb3977b192eba433ec470a391c4ea4 (patch)
tree72df888858c91e200bc94e9e633909d49525a329 /src/nsmenu.m
parent799a8a3338389013e8a76a70f507664ccb09a14f (diff)
downloademacs-5332857670eb3977b192eba433ec470a391c4ea4.tar.gz
emacs-5332857670eb3977b192eba433ec470a391c4ea4.zip
Fix macOS 12 deprecation notices
* src/nsterm.h: Add #defines to allow older versions of macOS to use the new constant names. * src/nsmenu.m: Replace old constant names with new. (fillWithWidgetValue): Remove calls to deprecated setMenuChangedMessagesEnabled. * src/nsterm.m: Replace old constant names with new. * src/nsfns.m: Replace old constant names with new.
Diffstat (limited to 'src/nsmenu.m')
-rw-r--r--src/nsmenu.m10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nsmenu.m b/src/nsmenu.m
index d1f4b020bb0..ea9f790990f 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -604,7 +604,7 @@ x_activate_menubar (struct frame *f)
604-(NSString *)parseKeyEquiv: (const char *)key 604-(NSString *)parseKeyEquiv: (const char *)key
605{ 605{
606 const char *tpos = key; 606 const char *tpos = key;
607 keyEquivModMask = NSCommandKeyMask; 607 keyEquivModMask = NSEventModifierFlagCommand;
608 608
609 if (!key || !strlen (key)) 609 if (!key || !strlen (key))
610 return @""; 610 return @"";
@@ -692,7 +692,6 @@ x_activate_menubar (struct frame *f)
692 widget_value *wv = (widget_value *)wvptr; 692 widget_value *wv = (widget_value *)wvptr;
693 693
694 /* clear existing contents */ 694 /* clear existing contents */
695 [self setMenuChangedMessagesEnabled: NO];
696 [self clear]; 695 [self clear];
697 696
698 /* add new contents */ 697 /* add new contents */
@@ -716,7 +715,6 @@ x_activate_menubar (struct frame *f)
716 } 715 }
717 } 716 }
718 717
719 [self setMenuChangedMessagesEnabled: YES];
720#ifdef NS_IMPL_GNUSTEP 718#ifdef NS_IMPL_GNUSTEP
721 if ([[self window] isVisible]) 719 if ([[self window] isVisible])
722 [self sizeToFit]; 720 [self sizeToFit];
@@ -748,7 +746,7 @@ x_activate_menubar (struct frame *f)
748/* p = [view convertPoint:p fromView: nil]; */ 746/* p = [view convertPoint:p fromView: nil]; */
749 p.y = NSHeight ([view frame]) - p.y; 747 p.y = NSHeight ([view frame]) - p.y;
750 e = [[view window] currentEvent]; 748 e = [[view window] currentEvent];
751 event = [NSEvent mouseEventWithType: NSRightMouseDown 749 event = [NSEvent mouseEventWithType: NSEventTypeRightMouseDown
752 location: p 750 location: p
753 modifierFlags: 0 751 modifierFlags: 0
754 timestamp: [e timestamp] 752 timestamp: [e timestamp]
@@ -1534,7 +1532,7 @@ ns_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
1534 [img autorelease]; 1532 [img autorelease];
1535 [imgView autorelease]; 1533 [imgView autorelease];
1536 1534
1537 aStyle = NSTitledWindowMask|NSClosableWindowMask|NSUtilityWindowMask; 1535 aStyle = NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSUtilityWindowMask;
1538 flag = YES; 1536 flag = YES;
1539 rows = 0; 1537 rows = 0;
1540 cols = 1; 1538 cols = 1;
@@ -1792,7 +1790,7 @@ ns_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
1792 1790
1793- (void)timeout_handler: (NSTimer *)timedEntry 1791- (void)timeout_handler: (NSTimer *)timedEntry
1794{ 1792{
1795 NSEvent *nxev = [NSEvent otherEventWithType: NSApplicationDefined 1793 NSEvent *nxev = [NSEvent otherEventWithType: NSEventTypeApplicationDefined
1796 location: NSMakePoint (0, 0) 1794 location: NSMakePoint (0, 0)
1797 modifierFlags: 0 1795 modifierFlags: 0
1798 timestamp: 0 1796 timestamp: 0