+Wed Nov 15 02:05:27 2006 John Ellis <johne@verizon.net>
+
+ * view_file_icon.c: Fix odd crash when removing files, it seems the
+ high priority idle sync is no longer called before the treeview tries
+ to redraw itself, so fix the cleanup of removed pointers so that they
+ are always valid or NULL (I wonder if the priorities used by
+ GtkTreeView have changed in newer versions of GTK?).
+ * view_file_list.c: Fix progress bar warning when files are removed
+ before thumbnail generation is finished.
+
Tue Nov 14 15:36:14 2006 John Ellis <johne@verizon.net>
* exif.[ch]: Fix memory alignment issues, bug #1593252.
/*
* GQview
- * (C) 2004 John Ellis
+ * (C) 2006 John Ellis
*
* Author: John Ellis
*
{
FileData fd;
SelectionType selected;
+ gint row;
};
memcpy(id, fd, sizeof(FileData));
id->selected = SELECTION_NONE;
+ id->row = -1;
work->data = id;
g_free(fd);
list = vficon_add_row(vfi, &iter);
while (work && list)
{
+ FileData *fd;
+
+ fd = work->data;
+ ICON_DATA(fd)->row = row;
+
list->data = work->data;
list = list->next;
work = work->next;
while (list)
{
FileData *fd;
+
if (work)
{
fd = work->data;
work = work->next;
c++;
+
+ ICON_DATA(fd)->row = r;
}
else
{
fd = NULL;
}
- if (list)
- {
- list->data = fd;
- list = list->next;
- }
+
+ list->data = fd;
+ list = list->next;
}
}
vfi->list = filelist_insert_sort(vfi->list, fd, vfi->sort_method, vfi->sort_ascend);
- vficon_sync(vfi);
+ vficon_sync_idle(vfi);
ret = TRUE;
}
else
/* Thumb loader check */
if (fd == vfi->thumbs_fd) vfi->thumbs_fd = NULL;
+ if (vfi->thumbs_count > 0) vfi->thumbs_count--;
if (vfi->prev_selection == fd) vfi->prev_selection = NULL;
if (vfi->click_fd == fd) vfi->click_fd = NULL;
/* remove pointer to this fd from grid */
store = gtk_tree_view_get_model(GTK_TREE_VIEW(vfi->listview));
- if (gtk_tree_model_iter_nth_child(store, &iter, NULL, row / vfi->columns))
+ if (ICON_DATA(fd)->row >= 0 &&
+ gtk_tree_model_iter_nth_child(store, &iter, NULL, ICON_DATA(fd)->row))
{
GList *list;
/* thumbnail loader check */
if (fd == vfl->thumbs_filedata) vfl->thumbs_filedata = NULL;
+ if (vfl->thumbs_count > 0) vfl->thumbs_count--;
vfl->list = g_list_remove(vfl->list, fd);
file_data_free(fd);