Mercurial > geeqie.yaz
diff src/pan-item.c @ 138:71e1ebee420e
replaced gchar* path with FileData *fd
author | nadvornik |
---|---|
date | Tue, 11 Sep 2007 20:06:29 +0000 |
parents | de64a683d5d0 |
children | f6e307c7bad6 |
line wrap: on
line diff
--- a/src/pan-item.c Thu Aug 23 20:45:59 2007 +0000 +++ b/src/pan-item.c Tue Sep 11 20:06:29 2007 +0000 @@ -25,7 +25,7 @@ if (!pi) return; if (pi->pixbuf) g_object_unref(pi->pixbuf); - if (pi->fd) file_data_free(pi->fd); + if (pi->fd) file_data_unref(pi->fd); g_free(pi->text); g_free(pi->key); g_free(pi->data); @@ -607,22 +607,20 @@ while (work) { PanCacheData *pc; - gchar *path; pc = work->data; work = work->next; - path = ((FileData *)pc)->path; - if (pc->cd && pc->cd->dimensions && - path && strcmp(path, pi->fd->path) == 0) + pc->fd && pc->fd == pi->fd) { pi->width = MAX(1, pc->cd->width * pw->image_size / 100); pi->height = MAX(1, pc->cd->height * pw->image_size / 100); pw->cache_list = g_list_remove(pw->cache_list, pc); cache_sim_data_free(pc->cd); - file_data_free((FileData *)pc); + file_data_unref(pc->fd); + g_free(pc); return; } }