[gtk+/gtk-2-24] 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-2-24] Rename gtk_tree_path_new_from_node() to tree_path_new_from_node()
- Date: Thu, 10 Mar 2016 21:33:25 +0000 (UTC)
commit a7968e783c24c2045178bce5c3de5f806842b40f
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 e6a3e94..344d10d 100644
--- a/gtk/gtkfilesystemmodel.c
+++ b/gtk/gtkfilesystemmodel.c
@@ -266,13 +266,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
@@ -281,7 +281,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);
@@ -293,7 +293,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);
@@ -573,7 +573,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]