static void bar_pane_comment_notify_cb(FileData *fd, NotifyType type, gpointer data)
{
PaneCommentData *pcd = data;
- if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE | NOTIFY_METADATA)) && fd == pcd->fd) bar_pane_comment_update(pcd);
+ if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE | NOTIFY_METADATA)) && fd == pcd->fd)
+ {
+ DEBUG_1("Notify pane_comment: %s %04x", fd->path, type);
+
+ bar_pane_comment_update(pcd);
+ }
}
static void bar_pane_comment_changed(GtkTextBuffer *buffer, gpointer data)
static void bar_pane_exif_notify_cb(FileData *fd, NotifyType type, gpointer data)
{
PaneExifData *ped = data;
- if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE | NOTIFY_METADATA)) && fd == ped->fd) bar_pane_exif_update(ped);
+ if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE | NOTIFY_METADATA)) && fd == ped->fd)
+ {
+ DEBUG_1("Notify pane_exif: %s %04x", fd->path, type);
+ bar_pane_exif_update(ped);
+ }
}
static void bar_pane_histogram_notify_cb(FileData *fd, NotifyType type, gpointer data)
{
PaneHistogramData *phd = data;
- if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE | NOTIFY_HISTMAP | NOTIFY_PIXBUF)) && fd == phd->fd) bar_pane_histogram_update(phd);
+ if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE | NOTIFY_HISTMAP | NOTIFY_PIXBUF)) && fd == phd->fd)
+ {
+ DEBUG_1("Notify pane_histogram: %s %04x", fd->path, type);
+ bar_pane_histogram_update(phd);
+ }
}
static gboolean bar_pane_histogram_expose_event_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data)
static void bar_pane_keywords_notify_cb(FileData *fd, NotifyType type, gpointer data)
{
PaneKeywordsData *pkd = data;
- if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE | NOTIFY_METADATA)) && fd == pkd->fd) bar_pane_keywords_update(pkd);
+ if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE | NOTIFY_METADATA)) && fd == pkd->fd)
+ {
+ DEBUG_1("Notify pane_keywords: %s %04x", fd->path, type);
+ bar_pane_keywords_update(pkd);
+ }
}
static gboolean bar_pane_keywords_changed_idle_cb(gpointer data)
{
if (!(type & NOTIFY_CHANGE) || !fd->change) return;
+ DEBUG_1("Notify cache_maint: %s %04x", fd->path, type);
switch (fd->change->type)
{
case FILEDATA_CHANGE_MOVE:
{
if (!(type & NOTIFY_CHANGE) || !fd->change) return;
+ DEBUG_1("Notify collect_manager: %s %04x", fd->path, type);
switch (fd->change->type)
{
case FILEDATA_CHANGE_MOVE:
CollectionData *cd = data;
if (!(type & NOTIFY_CHANGE) || !fd->change) return;
+
+ DEBUG_1("Notify collection: %s %04x", fd->path, type);
switch (fd->change->type)
{
DupeWindow *dw = data;
if (!(type & NOTIFY_CHANGE) || !fd->change) return;
+
+ DEBUG_1("Notify dupe: %s %04x", fd->path, type);
switch (fd->change->type)
{
if (fce->fd == fd)
{
/* entry exists */
- DEBUG_1("cache hit: fc=%p %s", fc, fd->path);
+ DEBUG_2("cache hit: fc=%p %s", fc, fd->path);
if (work == fc->list) return TRUE; /* already at the beginning */
/* move it to the beginning */
- DEBUG_1("cache move to front: fc=%p %s", fc, fd->path);
+ DEBUG_2("cache move to front: fc=%p %s", fc, fd->path);
fc->list = g_list_remove_link(fc->list, work);
fc->list = g_list_concat(work, fc->list);
}
work = work->next;
}
- DEBUG_1("cache miss: fc=%p %s", fc, fd->path);
+ DEBUG_2("cache miss: fc=%p %s", fc, fd->path);
return FALSE;
}
fc->list = g_list_delete_link(fc->list, work);
work = prev;
- DEBUG_1("file changed - cache remove: fc=%p %s", fc, last_fe->fd->path);
+ DEBUG_2("file changed - cache remove: fc=%p %s", fc, last_fe->fd->path);
fc->size -= last_fe->size;
fc->release(last_fe->fd);
file_data_unref(last_fe->fd);
if (file_cache_get(fc, fd)) return;
- DEBUG_1("cache add: fc=%p %s", fc, fd->path);
+ DEBUG_2("cache add: fc=%p %s", fc, fd->path);
fe = g_new(FileCacheEntry, 1);
fe->fd = file_data_ref(fd);
fe->size = size;
if (type & (NOTIFY_REREAD | NOTIFY_CHANGE)) /* invalidate the entry on each file change */
{
+ DEBUG_1("Notify cache: %s %04x", fd->path, type);
file_cache_remove_fd(fc, fd);
}
}
nd->priority = priority;
notify_func_list = g_list_insert_sorted(notify_func_list, nd, file_data_notify_sort);
- DEBUG_1("Notify func registered: %p", nd);
+ DEBUG_2("Notify func registered: %p", nd);
return TRUE;
}
{
notify_func_list = g_list_delete_link(notify_func_list, work);
g_free(nd);
- DEBUG_1("Notify func unregistered: %p", nd);
+ DEBUG_2("Notify func unregistered: %p", nd);
return TRUE;
}
work = work->next;
{
NotifyData *nd = (NotifyData *)work->data;
- DEBUG_1("Notify func calling: %p %s", nd, fd->path);
nd->func(fd, type, nd->data);
work = work->next;
}
{
if ((type & (NOTIFY_CHANGE | NOTIFY_REREAD)) && fd->histmap)
{
+ DEBUG_1("Notify histogram: %s %04x", fd->path, type);
histmap_free(fd->histmap);
fd->histmap = NULL;
}
while (g_source_remove_by_user_data(il))
{
- DEBUG_1("pending signals detected");
+ DEBUG_2("pending signals detected");
}
while (il->area_param_list)
if ((type & (NOTIFY_HISTMAP)) && osd->imd && fd == osd->imd->image_fd)
{
+ DEBUG_1("Notify osd: %s %04x", fd->path, type);
osd->notify |= type;
image_osd_update_schedule(osd, FALSE);
}
image_change_pixbuf(imd, imd->image_fd->pixbuf, image_zoom_get(imd), FALSE);
}
- file_cache_dump(image_get_cache());
+// file_cache_dump(image_get_cache());
return success;
}
if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE)) && fd == imd->image_fd)
{
+ DEBUG_1("Notify image: %s %04x", fd->path, type);
image_reload(imd);
}
}
if (!(type & NOTIFY_CHANGE) || !fd->change) return;
+ DEBUG_1("Notify view_window: %s %04x", fd->path, type);
+
switch (fd->change->type)
{
case FILEDATA_CHANGE_MOVE:
LayoutWindow *lw = data;
if (!(type & NOTIFY_CHANGE) || !fd->change) return;
+
+ DEBUG_1("Notify layout_image: %s %04x", fd->path, type);
switch (fd->change->type)
{
SearchData *sd = data;
if (!(type & NOTIFY_CHANGE) || !fd->change) return;
+
+ DEBUG_1("Notify search: %s %04x", fd->path, type);
switch (fd->change->type)
{
{
if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE)) && fd->thumb_pixbuf)
{
+ DEBUG_1("Notify thumb: %s %04x", fd->path, type);
g_object_unref(fd->thumb_pixbuf);
fd->thumb_pixbuf = NULL;
}
if (!S_ISDIR(fd->mode)) return; /* this gives correct results even on recently deleted files/directories */
+ DEBUG_1("Notify vd: %s %04x", fd->path, type);
+
base = remove_level_from_path(fd->path);
if (vd->type == DIRVIEW_LIST)
if (refresh)
{
+ DEBUG_1("Notify vf: %s %04x", fd->path, type);
vf_refresh_idle(vf);
}
}