app: warning message when compat mode set yet cannot be applied.

This would typically happen if the compat mode was set earlier through
the save dialog, then later changes in the image render it inapplicable.
When this happens, we unset the compat mode, and saves without error,
but still emit a warning for the user to know the compatibility got
dropped.
This commit is contained in:
Jehan 2015-09-01 19:32:51 +02:00
parent cb84d4bd7e
commit 9d9f30e7c0
1 changed files with 10 additions and 3 deletions

View File

@ -261,12 +261,19 @@ file_save_cmd_callback (GtkAction *action,
if (file && save_proc)
{
gint rle_version;
gint zlib_version;
const gchar *version_string;
gint rle_version;
gint zlib_version;
gimp_image_get_xcf_version (image, FALSE, &rle_version, NULL);
gimp_image_get_xcf_version (image, FALSE, &rle_version, &version_string);
gimp_image_get_xcf_version (image, TRUE, &zlib_version, NULL);
if (rle_version == zlib_version && gimp_image_get_xcf_compat_mode (image))
gimp_message (image->gimp, G_OBJECT (display), GIMP_MESSAGE_WARNING,
_("The image uses features from %s and "
"cannot be saved for older GIMP "
"versions."),
version_string);
saved = file_save_dialog_save_image (GIMP_PROGRESS (display),
gimp, image, file,
save_proc,