summaryrefslogtreecommitdiff
path: root/src/eog-image.h
diff options
context:
space:
mode:
authorLucas Rocha <lucasr@gnome.org>2007-10-15 20:59:57 +0000
committerLucas Almeida Rocha <lucasr@src.gnome.org>2007-10-15 20:59:57 +0000
commit3fb3190b27fc001e42fe2447b3ca178face4fa4d (patch)
tree2ad8447c752518f1c66d26e7579c8428289baa15 /src/eog-image.h
parent47976684a52fa835406713c8f9bd64f00970c982 (diff)
downloadeog-3fb3190b27fc001e42fe2447b3ca178face4fa4d.tar.gz
Because of a bug in gnome-vfs file monitoring, we need to avoid an image
2007-10-15 Lucas Rocha <lucasr@gnome.org> Because of a bug in gnome-vfs file monitoring, we need to avoid an image that is being saved to be removed and re-added by the monitor handler. We do this by setting the image's status to "saving" and, in case the image is being monitored, the status is only restored after the "fake" image deletion is notified by gnome-vfs. Fixes bug #475645. * bindings/python/eog.defs: remove eog_image_add_image_from_uri() from public API. * src/eog-image-private.h: added "prev_status" and "is_monitored" private attributes. * src/eog-image.[ch]: (eog_image_init): initialize new attributes. (eog_image_save_by_info): store previous status and restore only in case the image is not monitored. (eog_image_save_as_by_info): store previous status and restore only in case the image is not monitored. (eog_image_get_status), (eog_image_restore_status), (eog_image_set_is_monitored): new utility methods in public API. * src/eog-list-store.[ch]: (eog_list_store_append_image_from_uri): turned into a private method and we already have eog_list_store_add_image(). (vfs_monitor_dir_cb): only remove image if it's not being saved. (directory_visit_cb), (eog_list_store_add_uris): set images as monitored accordingly. svn path=/trunk/; revision=4135
Diffstat (limited to 'src/eog-image.h')
-rw-r--r--src/eog-image.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/eog-image.h b/src/eog-image.h
index 159b5b1b..62dc30ec 100644
--- a/src/eog-image.h
+++ b/src/eog-image.h
@@ -88,6 +88,7 @@ typedef enum {
EOG_IMAGE_STATUS_UNKNOWN,
EOG_IMAGE_STATUS_LOADING,
EOG_IMAGE_STATUS_LOADED,
+ EOG_IMAGE_STATUS_SAVING,
EOG_IMAGE_STATUS_FAILED
} EogImageStatus;
@@ -172,6 +173,13 @@ GnomeVFSURI* eog_image_get_uri (EogImage *img);
gchar* eog_image_get_uri_for_display (EogImage *img);
+EogImageStatus eog_image_get_status (EogImage *img);
+
+void eog_image_restore_status (EogImage *img);
+
+void eog_image_set_is_monitored (EogImage *img,
+ gboolean is_monitored);
+
void eog_image_transform (EogImage *img,
EogTransform *trans,
EogJob *job);