[gtk+] Adding note to docs of gtk_widget_set_window()



commit a6a036ce22c2fa21b47a405e625360c02a140c91
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Fri Sep 10 03:22:20 2010 +0900

    Adding note to docs of gtk_widget_set_window()
    
    gtk_widget_set_window() does not add a reference to the
    owned window... this is an exception to most gtk_foo_set_bar()
    functions where as it acts as if it were named gtk_widget_take_window().
    
    Adding note to the docs to avoid people giving the window to the
    widget and naturally proceeding to unref the window.

 gtk/gtkwidget.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 2a1c980..d749118 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -11616,6 +11616,8 @@ gtk_widget_get_requisition (GtkWidget      *widget,
  * by calling gtk_widget_set_has_window(). This is usually done in the
  * widget's init() function.
  *
+ * <note><para>This function does not add any reference to @window.</para></note>
+ *
  * Since: 2.18
  */
 void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]