mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
treelistmodel: Improve naming a bit
The complexity with model items vs row items is really confusing. Add to that treelistmodel position vs child model position vs parent position, and you're so confused, even the best naming can't help. And once you're there, consider passthrough vs non-passthrough...
This commit is contained in:
parent
29c700d1c7
commit
2c84049769
@ -3383,7 +3383,7 @@ gtk_tree_list_model_get_model
|
||||
gtk_tree_list_model_get_passthrough
|
||||
gtk_tree_list_model_set_autoexpand
|
||||
gtk_tree_list_model_get_autoexpand
|
||||
gtk_tree_list_model_get_child
|
||||
gtk_tree_list_model_get_child_row
|
||||
gtk_tree_list_model_get_row
|
||||
|
||||
<SUBSECTION>
|
||||
@ -3395,7 +3395,7 @@ gtk_tree_list_row_get_position
|
||||
gtk_tree_list_row_get_depth
|
||||
gtk_tree_list_row_get_children
|
||||
gtk_tree_list_row_get_parent
|
||||
gtk_tree_list_row_get_child
|
||||
gtk_tree_list_row_get_child_row
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TREE_LIST_MODEL
|
||||
|
@ -881,7 +881,7 @@ gtk_tree_list_model_get_autoexpand (GtkTreeListModel *self)
|
||||
* If @self is set to not be passthrough, this function is equivalent
|
||||
* to calling g_list_model_get_item().
|
||||
*
|
||||
* Do not confuse this function with gtk_tree_list_model_get_child().
|
||||
* Do not confuse this function with gtk_tree_list_model_get_child_row().
|
||||
*
|
||||
* Returns: (nullable) (transfer full): The row item
|
||||
**/
|
||||
@ -901,7 +901,7 @@ gtk_tree_list_model_get_row (GtkTreeListModel *self,
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_tree_list_model_get_child:
|
||||
* gtk_tree_list_model_get_child_row:
|
||||
* @self: a #GtkTreeListModel
|
||||
* @position: position of the child to get
|
||||
*
|
||||
@ -916,8 +916,8 @@ gtk_tree_list_model_get_row (GtkTreeListModel *self,
|
||||
* Returns: (nullable) (transfer full): the child in @position
|
||||
**/
|
||||
GtkTreeListRow *
|
||||
gtk_tree_list_model_get_child (GtkTreeListModel *self,
|
||||
guint position)
|
||||
gtk_tree_list_model_get_child_row (GtkTreeListModel *self,
|
||||
guint position)
|
||||
{
|
||||
TreeNode *child;
|
||||
|
||||
@ -1345,7 +1345,7 @@ gtk_tree_list_row_get_parent (GtkTreeListRow *self)
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_tree_list_row_get_child:
|
||||
* gtk_tree_list_row_get_child_row:
|
||||
* @self: a #GtkTreeListRow
|
||||
* @position: position of the child to get
|
||||
*
|
||||
@ -1355,8 +1355,8 @@ gtk_tree_list_row_get_parent (GtkTreeListRow *self)
|
||||
* Returns: (nullable) (transfer full): the child in @position
|
||||
**/
|
||||
GtkTreeListRow *
|
||||
gtk_tree_list_row_get_child (GtkTreeListRow *self,
|
||||
guint position)
|
||||
gtk_tree_list_row_get_child_row (GtkTreeListRow *self,
|
||||
guint position)
|
||||
{
|
||||
TreeNode *child;
|
||||
|
||||
|
@ -76,7 +76,7 @@ GDK_AVAILABLE_IN_ALL
|
||||
gboolean gtk_tree_list_model_get_autoexpand (GtkTreeListModel *self);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkTreeListRow * gtk_tree_list_model_get_child (GtkTreeListModel *self,
|
||||
GtkTreeListRow * gtk_tree_list_model_get_child_row (GtkTreeListModel *self,
|
||||
guint position);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkTreeListRow * gtk_tree_list_model_get_row (GtkTreeListModel *self,
|
||||
@ -100,7 +100,7 @@ GListModel * gtk_tree_list_row_get_children (GtkTreeListRow
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkTreeListRow * gtk_tree_list_row_get_parent (GtkTreeListRow *self);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkTreeListRow * gtk_tree_list_row_get_child (GtkTreeListRow *self,
|
||||
GtkTreeListRow * gtk_tree_list_row_get_child_row (GtkTreeListRow *self,
|
||||
guint position);
|
||||
|
||||
|
||||
|
@ -1251,13 +1251,13 @@ find_and_expand_object (GtkTreeListModel *model,
|
||||
|
||||
gtk_tree_list_row_set_expanded (parent_row, TRUE);
|
||||
pos = model_get_item_index (gtk_tree_list_row_get_children (parent_row), object);
|
||||
result = gtk_tree_list_row_get_child (parent_row, pos);
|
||||
result = gtk_tree_list_row_get_child_row (parent_row, pos);
|
||||
g_object_unref (parent_row);
|
||||
}
|
||||
else
|
||||
{
|
||||
pos = model_get_item_index (gtk_tree_list_model_get_model (model), object);
|
||||
result = gtk_tree_list_model_get_child (model, pos);
|
||||
result = gtk_tree_list_model_get_child_row (model, pos);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user