[gtk/ebassi/finish-template] docs: Clarify scope of gtk_widget_clear_template()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/finish-template] docs: Clarify scope of gtk_widget_clear_template()
- Date: Wed, 6 Jul 2022 12:30:42 +0000 (UTC)
commit 76d99bed7084e51f5d4cdb8a4ec5e881f59dbbe6
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Jul 6 13:04:22 2022 +0100
docs: Clarify scope of gtk_widget_clear_template()
The clear_template() method only clears the template children.
gtk/gtkwidget.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 13775aa1ad..fc69eae9a4 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -10983,10 +10983,13 @@ out:
* @widget: the widget with a template
* @widget_type: the type of the widget to finalize the template for
*
- * Clears the template data for the given widget.
+ * Clears the template children for the given widget.
*
* This function is the opposite of [method@Gtk.Widget.init_template], and
- * it is used to clear all the template data from a widget instance.
+ * it is used to clear all the template children from a widget instance.
+ * If you bound a template child to a field in the instance structure, or
+ * in the instance private data structure, the field will be set to `NULL`
+ * after this function returns.
*
* You should call this function inside the `GObjectClass.dispose()`
* implementation of any widget that called `gtk_widget_init_template()`.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]