id menu = [NSApp mainMenu];
static EmacsMenu *last_submenu = nil;
BOOL needsSet = NO;
- const char *submenuTitle = [[submenu title] UTF8String];
bool owfi;
Lisp_Object items;
widget_value *wv, *first_wv, *prev_wv = 0;
/* FIXME: we'd like to only parse the needed submenu, but this
was causing crashes in the _common parsing code.. need to make
sure proper initialization done.. */
-/* if (submenu && strcmp (submenuTitle, SSDATA (string)))
+/* if (submenu && strcmp ([[submenu title] UTF8String], SSDATA (string)))
continue; */
submenu_start[i] = menu_items_used;
{
/* should have found a menu for this one but didn't */
fprintf (stderr, "ERROR: did not find lisp menu for submenu '%s'.\n",
- submenuTitle);
+ [[submenu title] UTF8String]);
discard_menu_items ();
unbind_to (specpdl_count, Qnil);
[pool release];
string = AREF (items, i + 1);
if (NILP (string))
break;
-/* if (submenu && strcmp (submenuTitle, SSDATA (string)))
- continue; */
wv->name = SSDATA (string);
update_submenu_strings (wv->contents);
create a new menu for each sub and fill it. */
if (submenu)
{
+ const char *submenuTitle = [[submenu title] UTF8String];
for (wv = first_wv->contents; wv; wv = wv->next)
{
if (!strcmp (submenuTitle, wv->name))
x_activate_menubar (struct frame *f)
{
NSArray *a = [[NSApp mainMenu] itemArray];
- /* Update each submenu separatly so ns_update_menubar don't reset
+ /* Update each submenu separately so ns_update_menubar doesn't reset
the delegate. */
int i = 0;
while (i < [a count])
wr.size = [textField frame].size;
[win setFrame: wr display: YES];
+ [win setLevel: NSPopUpMenuWindowLevel];
[win orderFront: self];
[win display];
timer = [NSTimer scheduledTimerWithTimeInterval: (float)seconds target: self
NSTRACE (x-popup-dialog);
- check_ns ();
-
isQ = NILP (header);
if (EQ (position, Qt)
else
CHECK_WINDOW (window);
+ check_window_system (f);
+
p.x = (int)f->left_pos + ((int)FRAME_COLUMN_WIDTH (f) * f->text_cols)/2;
p.y = (int)f->top_pos + (FRAME_LINE_HEIGHT (f) * f->text_lines)/2;