diff options
| author | infirit <[email protected]> | 2014-07-25 13:53:15 +0200 | 
|---|---|---|
| committer | infirit <[email protected]> | 2014-07-25 13:53:15 +0200 | 
| commit | 49522507d46e185a92151baf304f00ed5d2fcea0 (patch) | |
| tree | 2c12549b286303a268ae852ea5ab3d85f714547d | |
| parent | 62d68512d2c08c3f22d9ba82c3d0b68039472c77 (diff) | |
| download | eom-49522507d46e185a92151baf304f00ed5d2fcea0.tar.bz2 eom-49522507d46e185a92151baf304f00ed5d2fcea0.tar.xz | |
Store the changed status of an image file
Based on oeg commit c1cc23e3c776c9b05b255c7127b4932d2d076b4e
From Claudio Saavedra <[email protected]>
| -rw-r--r-- | src/eom-image-private.h | 1 | ||||
| -rw-r--r-- | src/eom-image.c | 7 | 
2 files changed, 7 insertions, 1 deletions
| diff --git a/src/eom-image-private.h b/src/eom-image-private.h index 679774e..b0ba0f0 100644 --- a/src/eom-image-private.h +++ b/src/eom-image-private.h @@ -62,6 +62,7 @@ struct _EomImagePrivate {  	guint             iptc_chunk_len;  	gboolean          modified; +	gboolean          file_is_changed;  #ifdef HAVE_EXIF  	gboolean          autorotate; diff --git a/src/eom-image.c b/src/eom-image.c index 2eac5ea..c2fb5eb 100644 --- a/src/eom-image.c +++ b/src/eom-image.c @@ -289,6 +289,7 @@ eom_image_init (EomImage *img)  	img->priv->width = -1;  	img->priv->height = -1;  	img->priv->modified = FALSE; +	img->priv->file_is_changed = FALSE;  	g_mutex_init (&img->priv->status_mutex);  	img->priv->status = EOM_IMAGE_STATUS_UNKNOWN;          img->priv->metadata_status = EOM_IMAGE_METADATA_NOT_READ; @@ -1148,6 +1149,8 @@ eom_image_real_load (EomImage *img,  				priv->file_type = gdk_pixbuf_format_get_name (format);  			} +			priv->file_is_changed = FALSE; +  			/* If it's non-threadsafe loader, then trigger window   			 * showing in the end of the process. */  			if (!priv->threadsafe_format) @@ -2223,12 +2226,14 @@ eom_image_get_transform (EomImage *img)   * eom_image_file_changed:   * @img: a #EomImage   * - * Emits EomImage::file-changed signal + * Marks the image files contents as changed. Also, emits + * EomImage::file-changed signal   **/  void  eom_image_file_changed (EomImage *img)  {  	g_return_if_fail (EOM_IS_IMAGE (img)); +	img->priv->file_is_changed = TRUE;  	g_signal_emit (img, signals[SIGNAL_FILE_CHANGED], 0);  } | 
