app/core/gimpimagefile.[ch] app/file/file-open.c pass the MIME type from

2004-11-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.[ch]
	* app/file/file-open.c
	* app/file/file-save.c: pass the MIME type from the save procedure
	to gimp_imagefile_save_thumbnail() so that it can be stored with
	the thumbnail.

	* tools/pdbgen/pdb/fileops.pdb
	* app/pdb/fileops_cmds.c: changed accordingly.
This commit is contained in:
Sven Neumann 2004-11-13 17:13:21 +00:00 committed by Sven Neumann
parent b62ca985aa
commit 5a3b3fff70
7 changed files with 19 additions and 5 deletions

View File

@ -1,3 +1,14 @@
2004-11-13 Sven Neumann <sven@gimp.org>
* app/core/gimpimagefile.[ch]
* app/file/file-open.c
* app/file/file-save.c: pass the MIME type from the save procedure
to gimp_imagefile_save_thumbnail() so that it can be stored with
the thumbnail.
* tools/pdbgen/pdb/fileops.pdb
* app/pdb/fileops_cmds.c: changed accordingly.
2004-11-13 Sven Neumann <sven@gimp.org>
* app/plug-in/plug-in-proc-def.[ch]

View File

@ -394,6 +394,7 @@ gimp_imagefile_check_thumbnail (GimpImagefile *imagefile)
gboolean
gimp_imagefile_save_thumbnail (GimpImagefile *imagefile,
const gchar *mime_type,
GimpImage *gimage)
{
gint size;
@ -407,7 +408,8 @@ gimp_imagefile_save_thumbnail (GimpImagefile *imagefile,
if (size > 0)
{
gimp_thumbnail_set_info_from_image (imagefile->thumbnail, NULL, gimage);
gimp_thumbnail_set_info_from_image (imagefile->thumbnail,
mime_type, gimage);
success = gimp_imagefile_save_thumb (imagefile,
gimage, size, FALSE,

View File

@ -77,6 +77,7 @@ void gimp_imagefile_create_thumbnail_weak (GimpImagefile *imagefile,
gboolean replace);
gboolean gimp_imagefile_check_thumbnail (GimpImagefile *imagefile);
gboolean gimp_imagefile_save_thumbnail (GimpImagefile *imagefile,
const gchar *mime_type,
GimpImage *gimage);
const gchar * gimp_imagefile_get_desc_string (GimpImagefile *imagefile);

View File

@ -322,7 +322,7 @@ file_open_with_proc_and_display (Gimp *gimp,
/* no need to save a thumbnail if there's a good one already */
if (! gimp_imagefile_check_thumbnail (imagefile))
{
gimp_imagefile_save_thumbnail (imagefile, gimage);
gimp_imagefile_save_thumbnail (imagefile, mime_type, gimage);
}
}

View File

@ -205,7 +205,7 @@ file_save_as (GimpImage *gimage,
gimp_image_set_save_proc (gimage, file_proc);
}
gimp_imagefile_save_thumbnail (imagefile, gimage);
gimp_imagefile_save_thumbnail (imagefile, file_proc->mime_type, gimage);
gimp_recent_list_add_uri (uri, file_proc->mime_type);
}

View File

@ -431,7 +431,7 @@ file_save_thumbnail_invoker (Gimp *gimp,
if (success)
{
imagefile = gimp_imagefile_new (gimp, uri);
success = gimp_imagefile_save_thumbnail (imagefile, gimage);
success = gimp_imagefile_save_thumbnail (imagefile, NULL, gimage);
g_object_unref (imagefile);
}

View File

@ -316,7 +316,7 @@ HELP
if (success)
{
imagefile = gimp_imagefile_new (gimp, uri);
success = gimp_imagefile_save_thumbnail (imagefile, gimage);
success = gimp_imagefile_save_thumbnail (imagefile, NULL, gimage);
g_object_unref (imagefile);
}