diff audacious/prefswin.c @ 1188:35dc5d2a1675 trunk

[svn] - another API change [sorry!]
author nenolod
date Sun, 11 Jun 2006 23:51:02 -0700
parents d7848ff5bbe5
children 8b249765fdd1
line wrap: on
line diff
--- a/audacious/prefswin.c	Sun Jun 11 23:38:50 2006 -0700
+++ b/audacious/prefswin.c	Sun Jun 11 23:51:02 2006 -0700
@@ -2373,14 +2373,20 @@
 }
 
 void
-prefswin_page_destroy(gint id)
+prefswin_page_destroy(GtkWidget *container)
 {
     GtkTreeModel *model;
     GtkTreeIter iter;
     GtkTreeView *treeview = GTK_TREE_VIEW(category_treeview);
     gboolean ret;
-
-    if (category_notebook == NULL || treeview == NULL)
+    gint id;
+
+    if (category_notebook == NULL || treeview == NULL || container == NULL)
+        return;
+
+    id = gtk_notebook_page_num(GTK_NOTEBOOK(category_notebook), container);
+
+    if (id == -1)
         return;
 
     gtk_notebook_remove_page(GTK_NOTEBOOK(category_notebook), id);