summaryrefslogtreecommitdiff
path: root/gtk/gtkfilesystemmodel.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2012-10-31 20:21:47 -0600
committerFederico Mena Quintero <federico@gnome.org>2012-10-31 20:21:47 -0600
commit281c592ea9485d5cb53ee7073b2a7588db33a8a2 (patch)
tree75993bd10c1bb7958b547c57a5dbf6b03c5bd216 /gtk/gtkfilesystemmodel.c
parentf0a211a1df968393ff07e43672be64f854179c5b (diff)
downloadgtk+-281c592ea9485d5cb53ee7073b2a7588db33a8a2.tar.gz
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 <federico@gnome.org>
Diffstat (limited to 'gtk/gtkfilesystemmodel.c')
-rw-r--r--gtk/gtkfilesystemmodel.c14
1 files 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