changeset 106078:bff06ddbda0a

(Fx_popup_menu) [HAVE_NS]: Use generic code for window edge. Suggested by Chad Brown <yandros@mit.edu>. (push_menu_item): Use MENU_ITEMS_ITEM_* names.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 17 Nov 2009 03:32:04 +0000
parents be9db02d5127
children b38631655ffa
files src/ChangeLog src/menu.c
diffstat 2 files changed, 18 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- 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  <monnier@iro.umontreal.ca>
+
+	* menu.c (Fx_popup_menu) [HAVE_NS]: Use generic code for window edge.
+	Suggested by Chad Brown <yandros@mit.edu>.
+	(push_menu_item): Use MENU_ITEMS_ITEM_* names.
+
 2009-11-16  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* xmenu.c (x_menu_wait_for_event): Call XFlush before select.
@@ -19,11 +25,10 @@
 
 2009-11-13  Michael Albinus  <michael.albinus@gmx.de>
 
-	* 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  <monnier@iro.umontreal.ca>
 
--- 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,