]> Pileus Git - ~andy/gtk/commitdiff
Add a destroy notify for the callback data. (#344209, Murray Cumming)
authorMatthias Clasen <mclasen@redhat.com>
Thu, 8 Jun 2006 00:17:00 +0000 (00:17 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 8 Jun 2006 00:17:00 +0000 (00:17 +0000)
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)

ChangeLog
ChangeLog.pre-2-10
gtk/gtknotebook.c
gtk/gtknotebook.h

index 1f0c5071d58e5be68a66f31ac73a1bf3d3fe4a73..643faada31095a1c0d5d82346d41130737e68f6c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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+.
index 1f0c5071d58e5be68a66f31ac73a1bf3d3fe4a73..643faada31095a1c0d5d82346d41130737e68f6c 100644 (file)
@@ -1,3 +1,10 @@
+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+.
index 9f4d7cd2833da00a205806704cb0e50a4e987de2..2e02cbb77487c9ccd6f9e6cd87d0bff5d3a90bbf 100644 (file)
@@ -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;
 }
 
 /**
index b60efe55da1b47a78657f0bbb0adc924f6fbd30e..3c9c45eeb9a3823a26886e3bd9c51900ac38d2d0 100644 (file)
@@ -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);