comparison src/view_file_list.c @ 1506:d352a44545a6

Force thumbnails refreshing when thumbnails dimensions are modified through Preferences.
author zas_
date Thu, 02 Apr 2009 23:11:07 +0000
parents 331e2d60d447
children 24a12aa0cb54
comparison
equal deleted inserted replaced
1505:2a99cf2184b0 1506:d352a44545a6
1124 gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(vf->listview), 0, 0, &tpath, NULL, NULL, NULL)) 1124 gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(vf->listview), 0, 0, &tpath, NULL, NULL, NULL))
1125 { 1125 {
1126 GtkTreeModel *store; 1126 GtkTreeModel *store;
1127 GtkTreeIter iter; 1127 GtkTreeIter iter;
1128 gboolean valid = TRUE; 1128 gboolean valid = TRUE;
1129 1129
1130 store = gtk_tree_view_get_model(GTK_TREE_VIEW(vf->listview)); 1130 store = gtk_tree_view_get_model(GTK_TREE_VIEW(vf->listview));
1131 gtk_tree_model_get_iter(store, &iter, tpath); 1131 gtk_tree_model_get_iter(store, &iter, tpath);
1132 gtk_tree_path_free(tpath); 1132 gtk_tree_path_free(tpath);
1133 1133
1134 while (!fd && valid && tree_view_row_get_visibility(GTK_TREE_VIEW(vf->listview), &iter, FALSE) == 0) 1134 while (!fd && valid && tree_view_row_get_visibility(GTK_TREE_VIEW(vf->listview), &iter, FALSE) == 0)
1135 { 1135 {
1136 gtk_tree_model_get(store, &iter, FILE_COLUMN_POINTER, &fd, -1); 1136 FileData *nfd;
1137 if (fd->thumb_pixbuf) fd = NULL; 1137
1138 gtk_tree_model_get(store, &iter, FILE_COLUMN_POINTER, &nfd, -1);
1139
1140 if (!nfd->thumb_pixbuf) fd = nfd;
1138 1141
1139 valid = gtk_tree_model_iter_next(store, &iter); 1142 valid = gtk_tree_model_iter_next(store, &iter);
1140 } 1143 }
1141 } 1144 }
1142 1145
1193 } 1196 }
1194 1197
1195 return FALSE; 1198 return FALSE;
1196 } 1199 }
1197 1200
1198 static void vflist_thumb_update(ViewFile *vf) 1201 void vflist_thumb_update(ViewFile *vf)
1199 { 1202 {
1200 vflist_thumb_stop(vf); 1203 vflist_thumb_stop(vf);
1201 if (!VFLIST(vf)->thumbs_enabled) return; 1204 if (!VFLIST(vf)->thumbs_enabled) return;
1202 1205
1203 vflist_thumb_status(vf, 0.0, _("Loading thumbs...")); 1206 vflist_thumb_status(vf, 0.0, _("Loading thumbs..."));
1204 vf->thumbs_running = TRUE; 1207 vf->thumbs_running = TRUE;
1208
1209 if (thumb_format_changed)
1210 {
1211 GList *work = vf->list;
1212 while (work)
1213 {
1214 FileData *fd = work->data;
1215 if (fd->thumb_pixbuf)
1216 {
1217 g_object_unref(fd->thumb_pixbuf);
1218 fd->thumb_pixbuf = NULL;
1219 }
1220 work = work->next;
1221 }
1222
1223 thumb_format_changed = FALSE;
1224 }
1205 1225
1206 while (vflist_thumb_next(vf)); 1226 while (vflist_thumb_next(vf));
1207 } 1227 }
1208 1228
1209 /* 1229 /*