# HG changeset patch # User Stefan Monnier # Date 1258428724 0 # Node ID bff06ddbda0a0e9d7ae00d7017696e0b51f2ab24 # Parent be9db02d5127575aee16f5a94a8a0642b6ea46c2 (Fx_popup_menu) [HAVE_NS]: Use generic code for window edge. Suggested by Chad Brown . (push_menu_item): Use MENU_ITEMS_ITEM_* names. diff -r be9db02d5127 -r bff06ddbda0a src/ChangeLog --- a/src/ChangeLog Tue Nov 17 02:01:44 2009 +0000 +++ b/src/ChangeLog Tue Nov 17 03:32:04 2009 +0000 @@ -1,3 +1,9 @@ +2009-11-17 Stefan Monnier + + * menu.c (Fx_popup_menu) [HAVE_NS]: Use generic code for window edge. + Suggested by Chad Brown . + (push_menu_item): Use MENU_ITEMS_ITEM_* names. + 2009-11-16 Jan Djärv * xmenu.c (x_menu_wait_for_event): Call XFlush before select. @@ -19,11 +25,10 @@ 2009-11-13 Michael Albinus - * dbusbind.c (Vdbus_registered_objects_table): Renamed from + * dbusbind.c (Vdbus_registered_objects_table): Rename from Vdbus_registered_functions_table, because it contains also properties. Fix docstring. - (Fdbus_call_method, Fdbus_call_method_asynchronously): Fix - docstring. + (Fdbus_call_method, Fdbus_call_method_asynchronously): Fix docstring. 2009-11-13 Stefan Monnier diff -r be9db02d5127 -r bff06ddbda0a src/menu.c --- a/src/menu.c Tue Nov 17 02:01:44 2009 +0000 +++ b/src/menu.c Tue Nov 17 03:32:04 2009 +0000 @@ -248,14 +248,16 @@ if (menu_items_used + MENU_ITEMS_ITEM_LENGTH > menu_items_allocated) grow_menu_items (); - XVECTOR (menu_items)->contents[menu_items_used++] = name; - XVECTOR (menu_items)->contents[menu_items_used++] = enable; - XVECTOR (menu_items)->contents[menu_items_used++] = key; - XVECTOR (menu_items)->contents[menu_items_used++] = equiv; - XVECTOR (menu_items)->contents[menu_items_used++] = def; - XVECTOR (menu_items)->contents[menu_items_used++] = type; - XVECTOR (menu_items)->contents[menu_items_used++] = selected; - XVECTOR (menu_items)->contents[menu_items_used++] = help; + ASET (menu_items, menu_items_used + MENU_ITEMS_ITEM_NAME, name); + ASET (menu_items, menu_items_used + MENU_ITEMS_ITEM_ENABLE, enable); + ASET (menu_items, menu_items_used + MENU_ITEMS_ITEM_VALUE, key); + ASET (menu_items, menu_items_used + MENU_ITEMS_ITEM_EQUIV_KEY, equiv); + ASET (menu_items, menu_items_used + MENU_ITEMS_ITEM_DEFINITION, def); + ASET (menu_items, menu_items_used + MENU_ITEMS_ITEM_TYPE, type); + ASET (menu_items, menu_items_used + MENU_ITEMS_ITEM_SELECTED, selected); + ASET (menu_items, menu_items_used + MENU_ITEMS_ITEM_HELP, help); + + menu_items_used += MENU_ITEMS_ITEM_LENGTH; } /* Args passed between single_keymap_panes and single_menu_item. */ @@ -1182,13 +1184,8 @@ CHECK_LIVE_WINDOW (window); f = XFRAME (WINDOW_FRAME (win)); -#ifdef HAVE_NS /* FIXME: Is this necessary?? --Stef */ - xpos = FRAME_COLUMN_WIDTH (f) * WINDOW_LEFT_EDGE_COL (win); - ypos = FRAME_LINE_HEIGHT (f) * WINDOW_TOP_EDGE_LINE (win); -#else xpos = WINDOW_LEFT_EDGE_X (win); ypos = WINDOW_TOP_EDGE_Y (win); -#endif } else /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME,