Mercurial > geeqie.yaz
comparison src/image.c @ 1432:cf4029d10d38
improved notification system
author | nadvornik |
---|---|
date | Sat, 14 Mar 2009 17:21:35 +0000 |
parents | 7e180091e0b7 |
children | 96897bd5f6cd |
comparison
equal
deleted
inserted
replaced
1431:7e180091e0b7 | 1432:cf4029d10d38 |
---|---|
512 static void image_cache_set(ImageWindow *imd, FileData *fd) | 512 static void image_cache_set(ImageWindow *imd, FileData *fd) |
513 { | 513 { |
514 g_assert(fd->pixbuf); | 514 g_assert(fd->pixbuf); |
515 | 515 |
516 file_cache_put(image_get_cache(), fd, (gulong)gdk_pixbuf_get_rowstride(fd->pixbuf) * (gulong)gdk_pixbuf_get_height(fd->pixbuf)); | 516 file_cache_put(image_get_cache(), fd, (gulong)gdk_pixbuf_get_rowstride(fd->pixbuf) * (gulong)gdk_pixbuf_get_height(fd->pixbuf)); |
517 file_data_send_notification(fd, NOTIFY_TYPE_INTERNAL); /* to update histogram */ | 517 file_data_send_notification(fd, NOTIFY_PIXBUF); /* to update histogram */ |
518 } | 518 } |
519 | 519 |
520 static gint image_cache_get(ImageWindow *imd) | 520 static gint image_cache_get(ImageWindow *imd) |
521 { | 521 { |
522 gint success; | 522 gint success; |
1377 /* imd->il || */ /* loading in progress - do not check - it should start from the beginning anyway */ | 1377 /* imd->il || */ /* loading in progress - do not check - it should start from the beginning anyway */ |
1378 !imd->image_fd || /* nothing to reload */ | 1378 !imd->image_fd || /* nothing to reload */ |
1379 imd->state == IMAGE_STATE_NONE /* loading not started, no need to reload */ | 1379 imd->state == IMAGE_STATE_NONE /* loading not started, no need to reload */ |
1380 ) return; | 1380 ) return; |
1381 | 1381 |
1382 if (type == NOTIFY_TYPE_REREAD && fd == imd->image_fd) | 1382 if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE)) && fd == imd->image_fd) |
1383 { | 1383 { |
1384 image_reload(imd); | 1384 image_reload(imd); |
1385 } | 1385 } |
1386 } | 1386 } |
1387 | 1387 |