if (menu == nil)
{
- menu = [[EmacsMenu alloc] initWithTitle: @"Emacs"];
+ menu = [[EmacsMenu alloc] initWithTitle: ns_app_name];
needsSet = YES;
}
else
t = -(1000*tb.time+tb.millitm);
#endif
- /* widget_value is a straightforward object translation of emacs's
- Byzantine lisp menu structures */
- wv = xmalloc_widget_value ();
- wv->name = "Emacs";
- wv->value = 0;
- wv->enabled = 1;
- wv->button_type = BUTTON_TYPE_NONE;
- wv->help = Qnil;
- first_wv = wv;
-
#ifdef NS_IMPL_GNUSTEP
deep_p = 1; /* until GNUstep NSMenu implements the Panther delegation model */
#endif
int n;
Lisp_Object string;
+ wv = xmalloc_widget_value ();
+ wv->name = "menubar";
+ wv->value = 0;
+ wv->enabled = 1;
+ wv->button_type = BUTTON_TYPE_NONE;
+ wv->help = Qnil;
+ first_wv = wv;
+
/* Make widget-value tree w/ just the top level menu bar strings */
items = FRAME_MENU_BAR_ITEMS (f);
if (NILP (items))
NSMenuItem *item = [self itemAtIndex: n];
NSString *title = [item title];
if (([title length] == 0 /* OSX 10.5 */
- || [@"Emacs" isEqualToString: title] /* from 10.6 on */
+ || [ns_app_name isEqualToString: title] /* from 10.6 on */
|| [@"Apple" isEqualToString: title]) /* older */
&& ![item isSeparatorItem])
continue;
area.size.height= TEXTHEIGHT;
command = [[[NSTextField alloc] initWithFrame: area] autorelease];
[[self contentView] addSubview: command];
- [command setStringValue: @"Emacs"];
+ [command setStringValue: ns_app_name];
[command setDrawsBackground: NO];
[command setBezeled: NO];
[command setSelectable: NO];