diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index b5419955c4..11fbed2bd2 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -3860,68 +3860,6 @@ gtk_menu_set_display (GtkMenu *menu, } } -/** - * gtk_menu_attach: - * @menu: a #GtkMenu - * @child: a #GtkMenuItem - * @left_attach: The column number to attach the left side of the item to - * @right_attach: The column number to attach the right side of the item to - * @top_attach: The row number to attach the top of the item to - * @bottom_attach: The row number to attach the bottom of the item to - * - * Adds a new #GtkMenuItem to a (table) menu. The number of “cells” that - * an item will occupy is specified by @left_attach, @right_attach, - * @top_attach and @bottom_attach. These each represent the leftmost, - * rightmost, uppermost and lower column and row numbers of the table. - * (Columns and rows are indexed from zero). - * - * Note that this function is not related to gtk_menu_detach(). - */ -void -gtk_menu_attach (GtkMenu *menu, - GtkWidget *child, - guint left_attach, - guint right_attach, - guint top_attach, - guint bottom_attach) -{ - GtkMenuShell *menu_shell; - GtkWidget *parent; - - g_return_if_fail (GTK_IS_MENU (menu)); - g_return_if_fail (GTK_IS_MENU_ITEM (child)); - parent = gtk_widget_get_parent (child); - g_return_if_fail (parent == NULL || parent == GTK_WIDGET (menu)); - g_return_if_fail (left_attach < right_attach); - g_return_if_fail (top_attach < bottom_attach); - - menu_shell = GTK_MENU_SHELL (menu); - - if (!parent) - { - AttachInfo *ai = get_attach_info (child); - - ai->left_attach = left_attach; - ai->right_attach = right_attach; - ai->top_attach = top_attach; - ai->bottom_attach = bottom_attach; - - menu_shell->priv->children = g_list_append (menu_shell->priv->children, child); - gtk_widget_insert_before (child, GTK_WIDGET (menu), menu->priv->bottom_arrow_widget); - - menu_queue_resize (menu); - } - else - { - gtk_container_child_set (GTK_CONTAINER (parent), child, - "left-attach", left_attach, - "right-attach", right_attach, - "top-attach", top_attach, - "bottom-attach", bottom_attach, - NULL); - } -} - static gint gtk_menu_get_popup_delay (GtkMenuShell *menu_shell) { diff --git a/gtk/gtkmenu.h b/gtk/gtkmenu.h index c9a639c0a8..f9aa977b65 100644 --- a/gtk/gtkmenu.h +++ b/gtk/gtkmenu.h @@ -176,14 +176,6 @@ GDK_AVAILABLE_IN_ALL void gtk_menu_set_display (GtkMenu *menu, GdkDisplay *display); -GDK_AVAILABLE_IN_ALL -void gtk_menu_attach (GtkMenu *menu, - GtkWidget *child, - guint left_attach, - guint right_attach, - guint top_attach, - guint bottom_attach); - GDK_AVAILABLE_IN_ALL void gtk_menu_set_monitor (GtkMenu *menu, gint monitor_num);