Mercurial > geeqie.yaz
changeset 1553:626adbb26387
fixed tests for vd_find_row return value
author | nadvornik |
---|---|
date | Fri, 17 Apr 2009 20:26:22 +0000 |
parents | 15b2051b8919 |
children | a96a20c7feb1 |
files | src/view_dir.c src/view_dir_list.c |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/view_dir.c Tue Apr 14 21:51:29 2009 +0000 +++ b/src/view_dir.c Fri Apr 17 20:26:22 2009 +0000 @@ -229,7 +229,7 @@ GtkTreePath *tpath; GtkTreeIter iter; - if (!fd || vd_find_row(vd, fd, &iter) < 0) return; + if (!fd || !vd_find_row(vd, fd, &iter)) return; store = gtk_tree_view_get_model(GTK_TREE_VIEW(vd->view)); tpath = gtk_tree_model_get_path(store, &iter); @@ -244,7 +244,7 @@ GtkTreeModel *store; GtkTreeIter iter; - if (vd_find_row(vd, fd, &iter) < 0) return; + if (!vd_find_row(vd, fd, &iter)) return; store = gtk_tree_view_get_model(GTK_TREE_VIEW(vd->view)); switch (vd->type) @@ -917,7 +917,7 @@ GtkTreePath *tpath; gint cw, ch; - if (vd_find_row(vd, vd->click_fd, &iter) < 0) return; + if (!vd_find_row(vd, vd->click_fd, &iter)) return; store = gtk_tree_view_get_model(GTK_TREE_VIEW(vd->view)); tpath = gtk_tree_model_get_path(store, &iter); tree_view_get_cell_clamped(GTK_TREE_VIEW(vd->view), tpath, 0, TRUE, x, y, &cw, &ch);
--- a/src/view_dir_list.c Tue Apr 14 21:51:29 2009 +0000 +++ b/src/view_dir_list.c Fri Apr 17 20:26:22 2009 +0000 @@ -96,7 +96,7 @@ { GtkTreeIter iter; - if (GTK_WIDGET_REALIZED(vd->view) && vd_find_row(vd, fd, &iter) >= 0) + if (GTK_WIDGET_REALIZED(vd->view) && vd_find_row(vd, fd, &iter)) { GtkTreeModel *store; GtkTreePath *tpath;