Commit 7843d8b4 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Add a destroy notify for the callback data. (#344209, Murray Cumming)

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)
parent b92f15df
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+.
......
......@@ -397,6 +397,7 @@ static void stop_scrolling (GtkNotebook *notebook);
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 };
......@@ -7142,8 +7143,9 @@ gtk_notebook_reorder_child (GtkNotebook *notebook,
/**
* 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.
......@@ -7152,10 +7154,15 @@ gtk_notebook_reorder_child (GtkNotebook *notebook,
**/
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;
}
/**
......
......@@ -163,7 +163,8 @@ void gtk_notebook_remove_page (GtkNotebook *notebook,
***********************************************************/
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment