summaryrefslogtreecommitdiff
path: root/src/nsmenu.m
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2016-08-18 19:55:52 +0100
committerAlan Third <alan@idiocy.org>2016-08-24 19:21:56 +0100
commit5332857670eb3977b192eba433ec470a391c4ea4 (patch)
tree72df888858c91e200bc94e9e633909d49525a329 /src/nsmenu.m
parent799a8a3338389013e8a76a70f507664ccb09a14f (diff)
downloademacs-5332857670eb3977b192eba433ec470a391c4ea4.tar.gz
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)
-(NSString *)parseKeyEquiv: (const char *)key
{
const char *tpos = key;
- keyEquivModMask = NSCommandKeyMask;
+ keyEquivModMask = NSEventModifierFlagCommand;
if (!key || !strlen (key))
return @"";
@@ -692,7 +692,6 @@ x_activate_menubar (struct frame *f)
widget_value *wv = (widget_value *)wvptr;
/* clear existing contents */
- [self setMenuChangedMessagesEnabled: NO];
[self clear];
/* add new contents */
@@ -716,7 +715,6 @@ x_activate_menubar (struct frame *f)
}
}
- [self setMenuChangedMessagesEnabled: YES];
#ifdef NS_IMPL_GNUSTEP
if ([[self window] isVisible])
[self sizeToFit];
@@ -748,7 +746,7 @@ x_activate_menubar (struct frame *f)
/* p = [view convertPoint:p fromView: nil]; */
p.y = NSHeight ([view frame]) - p.y;
e = [[view window] currentEvent];
- event = [NSEvent mouseEventWithType: NSRightMouseDown
+ event = [NSEvent mouseEventWithType: NSEventTypeRightMouseDown
location: p
modifierFlags: 0
timestamp: [e timestamp]
@@ -1534,7 +1532,7 @@ ns_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
[img autorelease];
[imgView autorelease];
- aStyle = NSTitledWindowMask|NSClosableWindowMask|NSUtilityWindowMask;
+ aStyle = NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSUtilityWindowMask;
flag = YES;
rows = 0;
cols = 1;
@@ -1792,7 +1790,7 @@ ns_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
- (void)timeout_handler: (NSTimer *)timedEntry
{
- NSEvent *nxev = [NSEvent otherEventWithType: NSApplicationDefined
+ NSEvent *nxev = [NSEvent otherEventWithType: NSEventTypeApplicationDefined
location: NSMakePoint (0, 0)
modifierFlags: 0
timestamp: 0