Index: gnome-panel/applet.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/applet.c,v
retrieving revision 1.233
diff -u -r1.233 applet.c
--- gnome-panel/applet.c	6 Jul 2004 07:33:33 -0000	1.233
+++ gnome-panel/applet.c	11 Aug 2004 09:48:13 -0000
@@ -544,7 +544,7 @@
 	gtk_menu_popup (GTK_MENU (info->menu),
 			NULL,
 			NULL,
-			(GtkMenuPositionFunc) panel_position_applet_menu,
+			NULL,
 			info->widget,
 			event->button,
 			event->time);
Index: gnome-panel/menu-util.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/menu-util.c,v
retrieving revision 1.53
diff -u -r1.53 menu-util.c
--- gnome-panel/menu-util.c	28 Nov 2003 08:59:28 -0000	1.53
+++ gnome-panel/menu-util.c	11 Aug 2004 09:48:13 -0000
@@ -139,48 +139,6 @@
 	standard_position_within (menu, x, y, push_in, w);
 }
 
-void
-panel_position_applet_menu (GtkMenu   *menu,
-			    int       *x,
-			    int       *y,
-			    gboolean  *push_in,
-			    GtkWidget *widget)
-{
-	GtkRequisition  requisition;
-	GdkScreen      *screen;
-	int             menu_x = 0;
-	int             menu_y = 0;
-
-	g_return_if_fail (PANEL_IS_WIDGET (widget->parent));
-
-	screen = gtk_widget_get_screen (widget);
-
-	gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
-
-	gdk_window_get_origin (widget->window, &menu_x, &menu_y);
-
-	if (GTK_WIDGET_NO_WINDOW (widget)) {
-		menu_x += widget->allocation.x;
-		menu_y += widget->allocation.y;
-	}
-
-	if (PANEL_WIDGET (widget->parent)->orient == GTK_ORIENTATION_HORIZONTAL) {
-		if (menu_y > gdk_screen_get_height (screen) / 2)
-			menu_y -= requisition.height;
-		else
-			menu_y += widget->allocation.height;
-	} else {
-		if (menu_x > gdk_screen_get_width (screen) / 2)
-			menu_x -= requisition.width;
-		else
-			menu_x += widget->allocation.width;
-	}
-
-	*x = menu_x;
-	*y = menu_y;
-	*push_in = TRUE;
-}
-
 int
 get_default_menu_flags (void)
 {
Index: gnome-panel/menu-util.h
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/menu-util.h,v
retrieving revision 1.19
diff -u -r1.19 menu-util.h
--- gnome-panel/menu-util.h	24 Jul 2003 10:22:30 -0000	1.19
+++ gnome-panel/menu-util.h	11 Aug 2004 09:48:13 -0000
@@ -5,13 +5,6 @@
 
 G_BEGIN_DECLS
 
-void panel_position_applet_menu (GtkMenu   *menu,
-				 int       *x, 
-				 int       *y,
-				 gboolean  *push_in,
-				 GtkWidget *widget);
-
-
 void       panel_menu_position    (GtkMenu  *menu,
 				   gint     *x,
 				   gint     *y,
Index: gnome-panel/panel-menu-button.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-menu-button.c,v
retrieving revision 1.28
diff -u -r1.28 panel-menu-button.c
--- gnome-panel/panel-menu-button.c	4 Aug 2004 15:47:34 -0000	1.28
+++ gnome-panel/panel-menu-button.c	11 Aug 2004 09:48:14 -0000
@@ -356,7 +356,7 @@
 	gtk_menu_popup (button->priv->menu,
 			NULL,
 			NULL,
-			(GtkMenuPositionFunc) panel_position_applet_menu,
+			NULL,
 			GTK_WIDGET (button),
 			n_button,
 			activate_time);
Index: libpanel-applet/panel-applet.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/libpanel-applet/panel-applet.c,v
retrieving revision 1.89
diff -u -r1.89 panel-applet.c
--- libpanel-applet/panel-applet.c	7 Aug 2004 00:20:26 -0000	1.89
+++ libpanel-applet/panel-applet.c	11 Aug 2004 09:48:17 -0000
@@ -443,51 +443,6 @@
 	return retval;	
 }
 
-static void
-panel_applet_position_menu (GtkMenu   *menu,
-			    int       *x,
-			    int       *y,
-			    gboolean  *push_in,
-			    GtkWidget *widget)
-{
-	PanelApplet    *applet;
-	GtkRequisition  requisition;
-	GdkScreen      *screen;
-	int             menu_x = 0;
-	int             menu_y = 0;
-
-	g_return_if_fail (PANEL_IS_APPLET (widget));
-
-	applet = PANEL_APPLET (widget);
-
-	screen = gtk_widget_get_screen (widget);
-
-	gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
-
-	gdk_window_get_origin (widget->window, &menu_x, &menu_y);
-
-	menu_x += widget->allocation.x;
-	menu_y += widget->allocation.y;
-
-	if (applet->priv->orient == PANEL_APPLET_ORIENT_UP ||
-	    applet->priv->orient == PANEL_APPLET_ORIENT_DOWN) {
-		if (menu_y > gdk_screen_get_height (screen) / 2)
-			menu_y -= requisition.height;
-		else
-			menu_y += widget->allocation.height;
-	} else  {
-		if (menu_x > gdk_screen_get_width (screen) / 2)
-			menu_x -= requisition.width;
-		else
-			menu_x += widget->allocation.width;
-
-	}
-
-	*x = menu_x;
-	*y = menu_y;
-	*push_in = TRUE;
-}
-
 static gboolean
 panel_applet_can_focus (GtkWidget *widget)
 {
@@ -522,8 +477,7 @@
 	else if (event->button == 3) {
 		bonobo_control_do_popup_full (
 				applet->priv->control, 
-				NULL, NULL,
-				(GtkMenuPositionFunc) panel_applet_position_menu,
+				NULL, NULL, NULL,
 				applet,
 				event->button,
 				event->time);
@@ -538,8 +492,7 @@
 			  guint button,
 			  guint32 time)			  
 {
-	bonobo_control_do_popup_full (applet->priv->control, NULL, NULL,
-				      (GtkMenuPositionFunc) panel_applet_position_menu,
+	bonobo_control_do_popup_full (applet->priv->control, NULL, NULL, NULL,
 				      applet, button, time);
 	return TRUE;
 }
