From 281c592ea9485d5cb53ee7073b2a7588db33a8a2 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 31 Oct 2012 20:21:47 -0600 Subject: [PATCH] Rename gtk_tree_path_new_from_node() to tree_path_new_from_node() This is a function internal to the file system model; let's not pollute the gtk_tree_path namespace. Also, make the 'i' variable into 'r' as it refers to a row index, not a file-array index (for consistency with the docs and the rest of the code). Signed-off-by: Federico Mena Quintero --- gtk/gtkfilesystemmodel.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c index 1e5ffe33d9..9f738b90f7 100644 --- a/gtk/gtkfilesystemmodel.c +++ b/gtk/gtkfilesystemmodel.c @@ -263,13 +263,13 @@ node_invalidate_index (GtkFileSystemModel *model, guint id) } static GtkTreePath * -gtk_tree_path_new_from_node (GtkFileSystemModel *model, guint id) +tree_path_new_from_node (GtkFileSystemModel *model, guint id) { - guint i = node_get_tree_row (model, id); + guint r = node_get_tree_row (model, id); - g_assert (i < model->files->len); + g_assert (r < model->files->len); - return gtk_tree_path_new_from_indices (i, -1); + return gtk_tree_path_new_from_indices (r, -1); } static void @@ -278,7 +278,7 @@ emit_row_inserted_for_node (GtkFileSystemModel *model, guint id) GtkTreePath *path; GtkTreeIter iter; - path = gtk_tree_path_new_from_node (model, id); + path = tree_path_new_from_node (model, id); ITER_INIT_FROM_INDEX (model, &iter, id); gtk_tree_model_row_inserted (GTK_TREE_MODEL (model), path, &iter); gtk_tree_path_free (path); @@ -290,7 +290,7 @@ emit_row_changed_for_node (GtkFileSystemModel *model, guint id) GtkTreePath *path; GtkTreeIter iter; - path = gtk_tree_path_new_from_node (model, id); + path = tree_path_new_from_node (model, id); ITER_INIT_FROM_INDEX (model, &iter, id); gtk_tree_model_row_changed (GTK_TREE_MODEL (model), path, &iter); gtk_tree_path_free (path); @@ -570,7 +570,7 @@ gtk_file_system_model_get_path (GtkTreeModel *tree_model, g_return_val_if_fail (ITER_IS_VALID (model, iter), NULL); - return gtk_tree_path_new_from_node (model, ITER_INDEX (iter)); + return tree_path_new_from_node (model, ITER_INDEX (iter)); } static void