[gtk+/gtk-3-6] Rename gtk_tree_path_new_from_node() to tree_path_new_from_node()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-6] Rename gtk_tree_path_new_from_node() to tree_path_new_from_node()
- Date: Fri, 2 Nov 2012 20:19:57 +0000 (UTC)
commit 5f209cd4c1b9c8d9dd6686a91c4dc6a014d3ca4d
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Oct 31 20:21:47 2012 -0600
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>
gtk/gtkfilesystemmodel.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c
index 1e5ffe3..9f738b9 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]