comparison src/view_file_icon.c @ 1503:331e2d60d447

improved next/prev operation on sidecar files all operations with list index seem to be broken but IMHO this fix is sufficient for 1.0. Then it definitely needs a better interface.
author nadvornik
date Tue, 31 Mar 2009 21:33:54 +0000
parents bc3f5c0432f6
children d352a44545a6
comparison
equal deleted inserted replaced
1502:08f97835e816 1503:331e2d60d447
2052 2052
2053 id = g_list_nth_data(vf->list, row); 2053 id = g_list_nth_data(vf->list, row);
2054 return id ? id->fd : NULL; 2054 return id ? id->fd : NULL;
2055 } 2055 }
2056 2056
2057 gint vficon_index_by_path(ViewFile *vf, const gchar *path)
2058 {
2059 gint p = 0;
2060 GList *work;
2061
2062 if (!path) return -1;
2063
2064 work = vf->list;
2065 while (work)
2066 {
2067 IconData *id = work->data;
2068 FileData *fd = id->fd;
2069 if (strcmp(path, fd->path) == 0) return p;
2070 work = work->next;
2071 p++;
2072 }
2073
2074 return -1;
2075 }
2076 2057
2077 gint vficon_index_by_fd(ViewFile *vf, FileData *in_fd) 2058 gint vficon_index_by_fd(ViewFile *vf, FileData *in_fd)
2078 { 2059 {
2079 gint p = 0; 2060 gint p = 0;
2080 GList *work; 2061 GList *work;