#include "ui_fileops.h"
#include "ui_utildlg.h"
#include "cache_maint.h"
+#include "thumb.h"
#include <gdk/gdkkeysyms.h> /* for keyboard values */
/* register global notify functions */
file_data_register_notify_func(cache_notify_cb, NULL, NOTIFY_PRIORITY_HIGH);
+ file_data_register_notify_func(thumb_notify_cb, NULL, NOTIFY_PRIORITY_HIGH);
file_data_register_notify_func(collect_manager_notify_cb, NULL, NOTIFY_PRIORITY_LOW);
parse_command_line_for_debug_option(argc, argv);
}
#endif
+
+/* release thumb_pixbuf on file change - this forces reload. */
+void thumb_notify_cb(FileData *fd, NotifyType type, gpointer data)
+{
+ if (type != NOTIFY_TYPE_INTERNAL && fd->thumb_pixbuf)
+ {
+ g_object_unref(fd->thumb_pixbuf);
+ fd->thumb_pixbuf = NULL;
+ }
+}
+
+
/*
*-----------------------------------------------------------------------------
* xvpics thumbnail support, read-only (private)
GdkPixbuf *thumb_loader_get_pixbuf(ThumbLoader *tl);
+void thumb_notify_cb(FileData *fd, NotifyType type, gpointer data);
#endif