2013-08-11 Jan Djärv <jan.h.d@swipnet.se>
+ * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
+ (initWithTitle:): Initialize frame to 0.
+ (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
+ (fillWithWidgetValue:frame:): Renamed from
+ fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
+
+ * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
+ fillWithWidgetValue:frame:
+
* nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
remove memory leak warnings.
}
else
{
- [menu fillWithWidgetValue: first_wv->contents setDelegate:YES];
+ [menu fillWithWidgetValue: first_wv->contents frame: f];
}
}
/* override designated initializer */
- initWithTitle: (NSString *)title
{
+ frame = 0;
if ((self = [super initWithTitle: title]))
[self setAutoenablesItems: NO];
return self;
- (void)fillWithWidgetValue: (void *)wvptr
{
- [self fillWithWidgetValue: wvptr setDelegate:NO];
+ [self fillWithWidgetValue: wvptr frame:nil];
}
-- (void)fillWithWidgetValue: (void *)wvptr setDelegate: (BOOL)set
+- (void)fillWithWidgetValue: (void *)wvptr frame: (struct frame *)f
{
widget_value *wv = (widget_value *)wvptr;
if (wv->contents)
{
- EmacsMenu *submenu = [[EmacsMenu alloc] initWithTitle: [item title]];
+ EmacsMenu *submenu;
+
+ if (f)
+ submenu = [[EmacsMenu alloc] initWithTitle: [item title] frame:f];
+ else
+ submenu = [[EmacsMenu alloc] initWithTitle: [item title]];
-#ifdef NS_IMPL_COCOA
- if (set) [submenu setDelegate: submenu];
-#endif
[self setSubmenu: submenu forItem: item];
[submenu fillWithWidgetValue: wv->contents];
[submenu release];
- (NSString *)parseKeyEquiv: (const char *)key;
- (NSMenuItem *)addItemWithWidgetValue: (void *)wvptr;
- (void)fillWithWidgetValue: (void *)wvptr;
-- (void)fillWithWidgetValue: (void *)wvptr setDelegate: (BOOL)set;
+- (void)fillWithWidgetValue: (void *)wvptr frame: (struct frame *)f;
- (EmacsMenu *)addSubmenuWithTitle: (const char *)title forFrame: (struct frame *)f;
- (void) clear;
- (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f