# HG changeset patch # User nadvornik # Date 1237119614 0 # Node ID 2908c28eb59314c00641cad1d853666c8e4a5f82 # Parent 3265830658cd64dfb3999f777551d00a53135628 added notification to the exif pane diff -r 3265830658cd -r 2908c28eb593 src/bar_exif.c --- a/src/bar_exif.c Sun Mar 15 11:58:46 2009 +0000 +++ b/src/bar_exif.c Sun Mar 15 12:20:14 2009 +0000 @@ -232,6 +232,12 @@ bar_pane_exif_update(ped); } +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); +} + /* *------------------------------------------------------------------- * dnd @@ -597,6 +603,7 @@ { PaneExifData *ped = data; + file_data_unregister_notify_func(bar_pane_exif_notify_cb, ped); g_object_unref(ped->size_group); file_data_unref(ped->fd); g_free(ped); @@ -646,6 +653,8 @@ bar_pane_exif_dnd_init(ped->widget); g_signal_connect(ped->widget, "button_press_event", G_CALLBACK(bar_pane_exif_menu_cb), ped); + file_data_register_notify_func(bar_pane_exif_notify_cb, ped, NOTIFY_PRIORITY_LOW); + if (populate) { bar_pane_exif_add_entry(ped, EXIF_FORMATTED("Camera"), NULL, TRUE);