some file load plug-ins did call gimp_quit() in their load functions. This

2007-03-31  Michael Schumacher  <schumaml@cvs.gnome.org>

	* plug-ins/common/svg.c: 
	* plug-ins/common/tiff.c: 
	* plug-ins/common/wmf.c: 
	* plug-ins/jpeg/jpeg-load.c: some file load plug-ins did call
	gimp_quit() in their load functions. This aborts the plug-in
	instead of returning a GIMP_PDB_EXECUTION_ERROR. The run()
	function in each plug-in was already prepared to do this on
	errors.

svn path=/trunk/; revision=22212
This commit is contained in:
Michael Schumacher 2007-03-31 21:20:51 +00:00 committed by Michael Schumacher
parent 00be2f5f8c
commit a802571303
5 changed files with 21 additions and 10 deletions

View File

@ -1,3 +1,14 @@
2007-03-31 Michael Schumacher <schumaml@cvs.gnome.org>
* plug-ins/common/svg.c:
* plug-ins/common/tiff.c:
* plug-ins/common/wmf.c:
* plug-ins/jpeg/jpeg-load.c: some file load plug-ins did call
gimp_quit() in their load functions. This aborts the plug-in
instead of returning a GIMP_PDB_EXECUTION_ERROR. The run()
function in each plug-in was already prepared to do this on
errors.
2007-03-31 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable-blend.c: use SQR(x) instead of x*x.

View File

@ -320,7 +320,7 @@ load_image (const gchar *filename)
g_message (_("Could not open '%s' for reading: %s"),
gimp_filename_to_utf8 (filename),
error ? error->message : _("Unknown reason"));
gimp_quit ();
return -1;
}
gimp_progress_init (_("Rendering SVG"));

View File

@ -579,7 +579,7 @@ load_image (const gchar *filename)
{
g_message (_("Could not open '%s' for reading: %s"),
gimp_filename_to_utf8 (filename), g_strerror (errno));
gimp_quit ();
return -1;
}
TIFFSetWarningHandler (tiff_warning);
@ -607,14 +607,14 @@ load_image (const gchar *filename)
{
g_message ("Could not get image width from '%s'",
gimp_filename_to_utf8 (filename));
gimp_quit ();
return -1;
}
if (!TIFFGetField (tif, TIFFTAG_IMAGELENGTH, &rows))
{
g_message ("Could not get image length from '%s'",
gimp_filename_to_utf8 (filename));
gimp_quit ();
return -1;
}
if (!TIFFGetField (tif, TIFFTAG_PHOTOMETRIC, &photomet))
@ -730,7 +730,7 @@ load_image (const gchar *filename)
if ((image = gimp_image_new (cols, rows, image_type)) == -1)
{
g_message ("Could not create a new image");
gimp_quit ();
return -1;
}
gimp_image_undo_disable (image);
@ -907,7 +907,7 @@ load_image (const gchar *filename)
{
g_message ("Could not get colormaps from '%s'",
gimp_filename_to_utf8 (filename));
gimp_quit ();
return -1;
}
for (i = 0, j = 0; i < (1 << bps); i++)

View File

@ -948,7 +948,7 @@ load_image (const gchar *filename)
{
g_message (_("Could not open '%s' for reading."),
gimp_filename_to_utf8 (filename));
gimp_quit ();
return -1;
}
gimp_progress_init_printf (_("Opening '%s'"),

View File

@ -87,7 +87,7 @@ load_image (const gchar *filename,
{
g_message (_("Could not open '%s' for reading: %s"),
gimp_filename_to_utf8 (filename), g_strerror (errno));
gimp_quit ();
return -1;
}
if (!preview)
@ -112,7 +112,7 @@ load_image (const gchar *filename,
if (preview)
destroy_preview();
gimp_quit ();
return -1;
}
/* Now we can initialize the JPEG decompression object. */
@ -203,7 +203,7 @@ load_image (const gchar *filename,
"with %d color channels, using colorspace %d (%d).",
cinfo.output_components, cinfo.out_color_space,
cinfo.jpeg_color_space);
gimp_quit ();
return -1;
break;
}