[eog] Fixed bug 607287 - visibility issue while saving files



commit ab4c398e363345b9d486c701cdb48322bfff244a
Author: Javier SÃnchez <jsanchez deskblue com>
Date:   Thu Oct 27 12:16:27 2011 +0200

    Fixed bug 607287 - visibility issue while saving files
    
    - Reset "metadata::nautilus-icon-position" of the target file when we
      copy the file without modifications.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=607287

 src/eog-image.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/eog-image.c b/src/eog-image.c
index a34c2f6..9aa334b 100644
--- a/src/eog-image.c
+++ b/src/eog-image.c
@@ -1887,6 +1887,7 @@ eog_image_copy_file (EogImage *image, EogImageSaveInfo *source, EogImageSaveInfo
 	g_return_val_if_fail (EOG_IS_IMAGE_SAVE_INFO (source), FALSE);
 	g_return_val_if_fail (EOG_IS_IMAGE_SAVE_INFO (target), FALSE);
 
+	/* copy the image */
 	result = g_file_copy (source->file,
 			      target->file,
 			      (target->overwrite ? G_FILE_COPY_OVERWRITE : 0) |
@@ -1907,6 +1908,15 @@ eog_image_copy_file (EogImage *image, EogImageSaveInfo *source, EogImageSaveInfo
 			     "%s", ioerror->message);
 		}
 		g_error_free (ioerror);
+	} else {
+		/* reset NAUTILUS-ICON-POSITION metadata attribute */
+		g_file_set_attribute (target->file,
+				      "metadata::nautilus-icon-position",
+				      G_FILE_ATTRIBUTE_TYPE_INVALID,
+				      NULL,
+				      G_FILE_QUERY_INFO_NONE,
+				      NULL,
+				      NULL);
 	}
 
 	return result;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]