diff --git a/ChangeLog b/ChangeLog index 11f44aeca0..96b3542841 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2004-11-13 Sven Neumann + + * 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 * app/plug-in/plug-in-proc-def.[ch] diff --git a/app/core/gimpimagefile.c b/app/core/gimpimagefile.c index 4d61dde47b..ded102dcf1 100644 --- a/app/core/gimpimagefile.c +++ b/app/core/gimpimagefile.c @@ -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, diff --git a/app/core/gimpimagefile.h b/app/core/gimpimagefile.h index 02a383b758..67ec8f4dcc 100644 --- a/app/core/gimpimagefile.h +++ b/app/core/gimpimagefile.h @@ -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); diff --git a/app/file/file-open.c b/app/file/file-open.c index 28b79d7d83..49b417c735 100644 --- a/app/file/file-open.c +++ b/app/file/file-open.c @@ -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); } } diff --git a/app/file/file-save.c b/app/file/file-save.c index f7c39052a0..ebfb679b81 100644 --- a/app/file/file-save.c +++ b/app/file/file-save.c @@ -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); } diff --git a/app/pdb/fileops_cmds.c b/app/pdb/fileops_cmds.c index 31855dcfc4..a6cc47d82b 100644 --- a/app/pdb/fileops_cmds.c +++ b/app/pdb/fileops_cmds.c @@ -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); } diff --git a/tools/pdbgen/pdb/fileops.pdb b/tools/pdbgen/pdb/fileops.pdb index 7633e7fe3a..162fefa876 100644 --- a/tools/pdbgen/pdb/fileops.pdb +++ b/tools/pdbgen/pdb/fileops.pdb @@ -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); }