]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkuimanager.c
Do without GtkSelectionWindow
[~andy/gtk] / gtk / gtkuimanager.c
index f67fe962d9b6fa3bb992fed17e2c269832bbe204..75189aac3ecc695ec664994f695a554f1f5c795c 100644 (file)
@@ -714,7 +714,6 @@ gtk_ui_manager_buildable_add_child (GtkBuildable  *buildable,
 
   pos = g_list_length (manager->private_data->action_groups);
 
-  g_object_ref (child);
   gtk_ui_manager_insert_action_group (manager,
                                      GTK_ACTION_GROUP (child),
                                      pos);
@@ -2416,50 +2415,6 @@ find_toolbar_position (GNode      *node,
   return TRUE;
 }
 
-/**
- * _gtk_menu_is_empty:
- * @menu: (allow-none): a #GtkMenu or %NULL
- * 
- * Determines whether @menu is empty. A menu is considered empty if it
- * the only visible children are tearoff menu items or "filler" menu 
- * items which were inserted to mark the menu as empty.
- * 
- * This function is used by #GtkAction.
- *
- * Return value: whether @menu is empty.
- **/
-gboolean
-_gtk_menu_is_empty (GtkWidget *menu)
-{
-  GList *children, *cur;
-  gboolean result = TRUE;
-
-  g_return_val_if_fail (menu == NULL || GTK_IS_MENU (menu), TRUE);
-
-  if (!menu)
-    return FALSE;
-
-  children = gtk_container_get_children (GTK_CONTAINER (menu));
-
-  cur = children;
-  while (cur) 
-    {
-      if (gtk_widget_get_visible (cur->data))
-       {
-         if (!GTK_IS_TEAROFF_MENU_ITEM (cur->data) &&
-             !g_object_get_data (cur->data, "gtk-empty-menu-item"))
-            {
-             result = FALSE;
-              break;
-            }
-       }
-      cur = cur->next;
-    }
-  g_list_free (children);
-
-  return result;
-}
-
 enum {
   SEPARATOR_MODE_SMART,
   SEPARATOR_MODE_VISIBLE,