changeset 1501:299d45d4b1cc

fixed vdlist_find_row return value
author nadvornik
date Tue, 31 Mar 2009 20:53:37 +0000
parents 42081a3433bb
children 08f97835e816
files src/view_dir_list.c src/view_dir_tree.c
diffstat 2 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/view_dir_list.c	Tue Mar 31 20:35:04 2009 +0000
+++ b/src/view_dir_list.c	Tue Mar 31 20:53:37 2009 +0000
@@ -41,7 +41,6 @@
 {
 	GtkTreeModel *store;
 	gboolean valid;
-	gint row = 0;
 
 	store = gtk_tree_view_get_model(GTK_TREE_VIEW(vd->view));
 	valid = gtk_tree_model_get_iter_first(store, iter);
@@ -49,13 +48,12 @@
 		{
 		FileData *fd_n;
 		gtk_tree_model_get(GTK_TREE_MODEL(store), iter, DIR_COLUMN_POINTER, &fd_n, -1);
-		if (fd_n == fd) return row;
+		if (fd_n == fd) return TRUE;
 
 		valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(store), iter);
-		row++;
 		}
 
-	return -1;
+	return FALSE;
 }
 
 
--- a/src/view_dir_tree.c	Tue Mar 31 20:35:04 2009 +0000
+++ b/src/view_dir_tree.c	Tue Mar 31 20:53:37 2009 +0000
@@ -72,7 +72,7 @@
 	if (VDTREE(vd)->busy_ref > 0) VDTREE(vd)->busy_ref--;
 }
 
-gint vdtree_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter, GtkTreeIter *parent)
+gboolean vdtree_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter, GtkTreeIter *parent)
 {
 	GtkTreeModel *store;
 	gboolean valid;