+2006-06-07 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtknotebook.h:
+ * gtk/gtknotebook.c (gtk_notebook_set_window_creation_hook):
+ Add a destroy notify for the callback data. (#344209,
+ Murray Cumming)
+
2006-06-07 Jürg Billeter <j@bitron.ch>
* gtk/Makefile.am: Fix building gtkbuiltincache.h without system GTK+.
+2006-06-07 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtknotebook.h:
+ * gtk/gtknotebook.c (gtk_notebook_set_window_creation_hook):
+ Add a destroy notify for the callback data. (#344209,
+ Murray Cumming)
+
2006-06-07 Jürg Billeter <j@bitron.ch>
* gtk/Makefile.am: Fix building gtkbuiltincache.h without system GTK+.
static GtkNotebookWindowCreationFunc window_creation_hook = NULL;
static gpointer window_creation_hook_data;
+static GDestroyNotify window_creation_hook_destroy = NULL;
static guint notebook_signals[LAST_SIGNAL] = { 0 };
/**
* gtk_notebook_set_window_creation_hook:
- * @func: the #GtkNotebookWindowCreationFunc, or NULL
- * @data: user data for @func.
+ * @func: the #GtkNotebookWindowCreationFunc, or %NULL
+ * @data: user data for @func
+ * @destroy: Destroy notifier for @data, or %NULL
*
* Installs a global function used to create a window
* when a detached tab is dropped in an empty area.
**/
void
gtk_notebook_set_window_creation_hook (GtkNotebookWindowCreationFunc func,
- gpointer data)
+ gpointer data,
+ GDestroyNotify destroy)
{
+ if (window_creation_hook_destroy)
+ window_creation_hook_destroy (window_creation_hook_data);
+
window_creation_hook = func;
window_creation_hook_data = data;
+ window_creation_hook_destroy = destroy;
}
/**
***********************************************************/
void gtk_notebook_set_window_creation_hook (GtkNotebookWindowCreationFunc func,
- gpointer data);
+ gpointer data,
+ GDestroyNotify destroy);
void gtk_notebook_set_group_id (GtkNotebook *notebook,
gint group_id);
gint gtk_notebook_get_group_id (GtkNotebook *notebook);