Mercurial > geeqie
changeset 664:db373fb1b9d8
Merge vflist_row_by_path() into vflist_index_by_path().
author | zas_ |
---|---|
date | Wed, 14 May 2008 12:59:00 +0000 |
parents | 4154b8be989b |
children | 97dd95e210c8 |
files | src/view_file_list.c |
diffstat | 1 files changed, 4 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/view_file_list.c Wed May 14 10:40:43 2008 +0000 +++ b/src/view_file_list.c Wed May 14 12:59:00 2008 +0000 @@ -1045,7 +1045,7 @@ return g_list_nth_data(vf->list, row); } -static gint vflist_row_by_path(ViewFile *vf, const gchar *path, FileData **fd) +gint vflist_index_by_path(ViewFile *vf, const gchar *path) { gint p = 0; GList *work; @@ -1055,25 +1055,16 @@ work = vf->list; while (work) { - FileData *fd_n = work->data; - if (strcmp(path, fd_n->path) == 0) - { - if (fd) *fd = fd_n; - return p; - } + FileData *fd = work->data; + if (strcmp(path, fd->path) == 0) return p; + work = work->next; p++; } - if (fd) *fd = NULL; return -1; } -gint vflist_index_by_path(ViewFile *vf, const gchar *path) -{ - return vflist_row_by_path(vf, path, NULL); -} - gint vflist_count(ViewFile *vf, gint64 *bytes) { if (bytes)