rpms/eog/devel eog-2.19.2-svgz.patch, NONE, 1.1 eog.spec, 1.79, 1.80 eog-2.18.0.1-svgz.patch, 1.1, NONE

Matthias Clasen (mclasen) fedora-extras-commits at redhat.com
Sun May 20 00:40:51 UTC 2007


Author: mclasen

Update of /cvs/pkgs/rpms/eog/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8635

Modified Files:
	eog.spec 
Added Files:
	eog-2.19.2-svgz.patch 
Removed Files:
	eog-2.18.0.1-svgz.patch 
Log Message:
Update patch


eog-2.19.2-svgz.patch:

--- NEW FILE eog-2.19.2-svgz.patch ---
--- eog-2.19.2/src/eog-image.c.svgz	2007-05-14 13:02:45.000000000 -0400
+++ eog-2.19.2/src/eog-image.c	2007-05-19 20:35:24.000000000 -0400
@@ -477,7 +477,7 @@ eog_image_apply_transformations (EogImag
 }
 
 static GnomeVFSFileSize
-eog_image_determine_file_bytes (EogImage *img, GError **error)
+eog_image_determine_file_bytes (EogImage *img, gchar **mime_type, GError **error)
 {
 	GnomeVFSFileInfo *info;
 	GnomeVFSFileSize bytes;
@@ -488,11 +488,14 @@ eog_image_determine_file_bytes (EogImage
 	result = gnome_vfs_get_file_info_uri (img->priv->uri,
 					      info,
 					      GNOME_VFS_FILE_INFO_DEFAULT |
+					      GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
 					      GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
 
 	if ((result != GNOME_VFS_OK) || 
 	    (info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE) == 0) {
 		bytes = 0;
+		if (mime_type)
+			*mime_type = NULL;
 
 		g_set_error (error, 
 			     EOG_IMAGE_ERROR, 
@@ -500,6 +503,8 @@ eog_image_determine_file_bytes (EogImage
 			     gnome_vfs_result_to_string (result));
 	} else {
 		bytes = info->size;
+		if (mime_type)
+			*mime_type = g_strdup (info->mime_type);
 	}
 
 	gnome_vfs_file_info_unref (info);
@@ -831,6 +836,7 @@ eog_image_real_load (EogImage *img, 
 	GnomeVFSResult result;
 	EogMetadataReader *md_reader = NULL;
 	GdkPixbufFormat *format;
+	gchar *mime_type;
 	GdkPixbufLoader *loader = NULL;
 	guchar *buffer;
 	gboolean failed = FALSE;
@@ -851,9 +857,10 @@ eog_image_real_load (EogImage *img, 
 		priv->file_type = NULL;
 	}
 
-	priv->bytes = eog_image_determine_file_bytes (img, error);
+	priv->bytes = eog_image_determine_file_bytes (img, &mime_type, error);
 
 	if (priv->bytes == 0 && (error == NULL || *error != NULL)) {
+		g_free (mime_type);
 		return FALSE;
 	}
 
@@ -876,6 +883,7 @@ eog_image_real_load (EogImage *img, 
 	result = gnome_vfs_open_uri (&handle, priv->uri, GNOME_VFS_OPEN_READ);
 
 	if (result != GNOME_VFS_OK) {
+		g_free (mime_type);
 		g_set_error (error, 
 			     EOG_IMAGE_ERROR, 
 			     EOG_IMAGE_ERROR_VFS,
@@ -885,9 +893,12 @@ eog_image_real_load (EogImage *img, 
 	}
 	
 	buffer = g_new0 (guchar, EOG_IMAGE_READ_BUFFER_SIZE);
+	loader = gdk_pixbuf_loader_new_with_mime_type (mime_type, NULL);
+	g_free (mime_type);
+	if (loader == NULL)
+		loader = gdk_pixbuf_loader_new (); 
 
 	if (read_image_data || read_only_dimension) {
-		loader = gdk_pixbuf_loader_new ();
 
 		g_signal_connect_object (G_OBJECT (loader), 
 					 "size-prepared", 


Index: eog.spec
===================================================================
RCS file: /cvs/pkgs/rpms/eog/devel/eog.spec,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- eog.spec	20 May 2007 00:23:49 -0000	1.79
+++ eog.spec	20 May 2007 00:40:16 -0000	1.80
@@ -18,7 +18,7 @@
 Release: 1%{?dist}
 URL: http://www.gnome.org
 Source: http://download.gnome.org/sources/eog/2.19/%{name}-%{version}.tar.bz2
-Patch0: eog-2.18.0.1-svgz.patch
+Patch0: eog-2.19.2-svgz.patch
 License: GPL 
 Group: User Interface/Desktops
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 


--- eog-2.18.0.1-svgz.patch DELETED ---




More information about the fedora-extras-commits mailing list