treelistmodel: Clarify docs
authorBenjamin Otte <otte@redhat.com>
Sun, 19 Mar 2023 04:25:52 +0000 (05:25 +0100)
committerBenjamin Otte <otte@redhat.com>
Sun, 19 Mar 2023 05:55:05 +0000 (06:55 +0100)
No user knows that we have an internal function called
gtk_tree_list_row_destroy() that gets called when a row gets removed
from the treelistmodel.

So everyone was probably just making stuff up about what "destroy"
means.

Related: #5646

gtk/gtktreelistmodel.c

index fe9240e4b41158a731b305af739015333ce0681b..8a189fe2ce1d231ea4a73b20f2a09c01041c31c4 100644 (file)
@@ -1120,7 +1120,8 @@ gtk_tree_list_row_get_position (GtkTreeListRow *self)
  * of zero, rows corresponding to items of models of direct children
  * of the root model have a depth of 1 and so on.
  *
- * The depth of a row never changes until the row is destroyed.
+ * The depth of a row never changes until the row is removed from its model
+ * at which point it will forever return 0.
  *
  * Returns: The depth of this row
  */
@@ -1228,7 +1229,8 @@ gtk_tree_list_row_get_expanded (GtkTreeListRow *self)
  * This does not mean that the row is actually expanded,
  * this can be checked with [method@Gtk.TreeListRow.get_expanded].
  *
- * If a row is expandable never changes until the row is destroyed.
+ * If a row is expandable never changes until the row is removed
+ * from its model at which point it will forever return %FALSE.
  *
  * Returns: %TRUE if the row is expandable
  */
@@ -1315,7 +1317,8 @@ gtk_tree_list_row_get_children (GtkTreeListRow *self)
  * %NULL is returned.
  *
  * The value returned by this function never changes
- * until the row is destroyed.
+ * until the row is removed from its model at which point
+ * it will forever return %NULL.
  *
  * Returns: (nullable) (transfer full): The parent of @self
  */