comparison src/view_file_list.c @ 838:9bd49e725ad3

use FileData in thumb_loader
author nadvornik
date Sun, 15 Jun 2008 20:09:15 +0000
parents 1014e8f72f94
children add46f9c895c
comparison
equal deleted inserted replaced
837:f8c22438376c 838:9bd49e725ad3
1006 GtkTreeStore *store; 1006 GtkTreeStore *store;
1007 GtkTreeIter iter; 1007 GtkTreeIter iter;
1008 1008
1009 if (!fd || vflist_find_row(vf, fd, &iter) < 0) return; 1009 if (!fd || vflist_find_row(vf, fd, &iter) < 0) return;
1010 1010
1011 if (fd->pixbuf) g_object_unref(fd->pixbuf);
1012 fd->pixbuf = thumb_loader_get_pixbuf(tl, TRUE);
1013
1014 store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(vf->listview))); 1011 store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(vf->listview)));
1015 gtk_tree_store_set(store, &iter, FILE_COLUMN_THUMB, fd->pixbuf, -1); 1012 gtk_tree_store_set(store, &iter, FILE_COLUMN_THUMB, fd->pixbuf, -1);
1016 1013
1017 vflist_thumb_status(vf, (gdouble)(vf->thumbs_count) / vflist_sidecar_list_count(vf->list), _("Loading thumbs...")); 1014 vflist_thumb_status(vf, (gdouble)(vf->thumbs_count) / vflist_sidecar_list_count(vf->list), _("Loading thumbs..."));
1018 } 1015 }
1111 vflist_thumb_done_cb, 1108 vflist_thumb_done_cb,
1112 vflist_thumb_error_cb, 1109 vflist_thumb_error_cb,
1113 NULL, 1110 NULL,
1114 vf); 1111 vf);
1115 1112
1116 if (!thumb_loader_start(vf->thumbs_loader, fd->path)) 1113 if (!thumb_loader_start(vf->thumbs_loader, fd))
1117 { 1114 {
1118 /* set icon to unknown, continue */ 1115 /* set icon to unknown, continue */
1119 DEBUG_1("thumb loader start failed %s", vf->thumbs_loader->path); 1116 DEBUG_1("thumb loader start failed %s", fd->path);
1120 vflist_thumb_do(vf, vf->thumbs_loader, fd); 1117 vflist_thumb_do(vf, vf->thumbs_loader, fd);
1121 1118
1122 return TRUE; 1119 return TRUE;
1123 } 1120 }
1124 1121