plug-ins/common/align-layers.c plug-ins/common/blur-gauss.c

2008-08-20  Michael Natterer  <mitch@gimp.org>

	* plug-ins/common/align-layers.c
	* plug-ins/common/blur-gauss.c
	* plug-ins/common/cartoon.c
	* plug-ins/common/edge-dog.c
	* plug-ins/common/edge-neon.c
	* plug-ins/common/edge-sobel.c
	* plug-ins/common/photocopy.c
	* plug-ins/common/pixelize.c
	* plug-ins/common/softglow.c
	* plug-ins/gradient-flare/gradient-flare.c: pass error messages
	with the return values instead of calling g_message().


svn path=/trunk/; revision=26679
This commit is contained in:
Michael Natterer 2008-08-20 14:19:35 +00:00 committed by Michael Natterer
parent 84bbb4d0a3
commit b28a3306e0
11 changed files with 63 additions and 29 deletions

View File

@ -1,3 +1,17 @@
2008-08-20 Michael Natterer <mitch@gimp.org>
* plug-ins/common/align-layers.c
* plug-ins/common/blur-gauss.c
* plug-ins/common/cartoon.c
* plug-ins/common/edge-dog.c
* plug-ins/common/edge-neon.c
* plug-ins/common/edge-sobel.c
* plug-ins/common/photocopy.c
* plug-ins/common/pixelize.c
* plug-ins/common/softglow.c
* plug-ins/gradient-flare/gradient-flare.c: pass error messages
with the return values instead of calling g_message().
2008-08-20 Michael Natterer <mitch@gimp.org>
* plug-ins/common/file-gif-load.c: tons of cleanup: proper

View File

@ -146,7 +146,7 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
static GimpParam values[2];
GimpPDBStatusType status = GIMP_PDB_EXECUTION_ERROR;
GimpRunMode run_mode;
gint image_id, layer_num;
@ -168,7 +168,9 @@ run (const gchar *name,
gimp_image_get_layers (image_id, &layer_num);
if (layer_num < 2)
{
g_message (_("There are not enough layers to align."));
*nreturn_vals = 2;
values[1].type = GIMP_PDB_STRING;
values[1].data.d_string = _("There are not enough layers to align.");
return;
}
gimp_get_data (PLUG_IN_PROC, &VALS);

View File

@ -265,7 +265,7 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
static GimpParam values[2];
gint32 image_ID;
GimpDrawable *drawable;
GimpRunMode run_mode;
@ -442,8 +442,10 @@ run (const gchar *name,
}
else
{
g_message (_("Cannot operate on indexed color images."));
status = GIMP_PDB_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
*nreturn_vals = 2;
values[1].type = GIMP_PDB_STRING;
values[1].data.d_string = _("Cannot operate on indexed color images.");
}
gimp_drawable_detach (drawable);

View File

@ -160,7 +160,7 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
static GimpParam values[2];
GimpRunMode run_mode;
GimpDrawable *drawable;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
@ -226,8 +226,10 @@ run (const gchar *name,
}
else
{
g_message (_("Cannot operate on indexed color images."));
status = GIMP_PDB_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
*nreturn_vals = 2;
values[1].type = GIMP_PDB_STRING;
values[1].data.d_string = _("Cannot operate on indexed color images.");
}
}

View File

@ -153,7 +153,7 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
static GimpParam values[2];
gint32 image_ID;
GimpDrawable *drawable;
GimpRunMode run_mode;
@ -248,8 +248,10 @@ run (const gchar *name,
}
else
{
g_message (_("Cannot operate on indexed color images."));
status = GIMP_PDB_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
*nreturn_vals = 2;
values[1].type = GIMP_PDB_STRING;
values[1].data.d_string = _("Cannot operate on indexed color images.");
}
gimp_drawable_detach (drawable);

View File

@ -152,7 +152,7 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
static GimpParam values[2];
GimpRunMode run_mode;
GimpDrawable *drawable;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
@ -222,8 +222,10 @@ run (const gchar *name,
}
else
{
g_message (_("Cannot operate on indexed color images."));
status = GIMP_PDB_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
*nreturn_vals = 2;
values[1].type = GIMP_PDB_STRING;
values[1].data.d_string = _("Cannot operate on indexed color images.");
}
values[0].data.d_status = status;

View File

@ -134,7 +134,7 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
static GimpParam values[2];
GimpDrawable *drawable;
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
@ -206,8 +206,10 @@ run (const gchar *name,
}
else
{
/* g_message ("Cannot operate on indexed color images"); */
status = GIMP_PDB_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
*nreturn_vals = 2;
values[1].type = GIMP_PDB_STRING;
values[1].data.d_string = _("Cannot operate on indexed color images.");
}
gimp_drawable_detach (drawable);

View File

@ -171,7 +171,7 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
static GimpParam values[2];
GimpRunMode run_mode;
GimpDrawable *drawable;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
@ -238,8 +238,10 @@ run (const gchar *name,
}
else
{
g_message (_("Cannot operate on indexed color images."));
status = GIMP_PDB_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
*nreturn_vals = 2;
values[1].type = GIMP_PDB_STRING;
values[1].data.d_string = _("Cannot operate on indexed color images.");
}
}

View File

@ -198,7 +198,7 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
static GimpParam values[2];
GimpDrawable *drawable;
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
@ -287,8 +287,10 @@ run (const gchar *name,
}
else
{
/* g_message ("pixelize: cannot operate on indexed color images"); */
status = GIMP_PDB_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
*nreturn_vals = 2;
values[1].type = GIMP_PDB_STRING;
values[1].data.d_string = _("Cannot operate on indexed color images.");
}
}

View File

@ -152,7 +152,7 @@ run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
static GimpParam values[2];
GimpRunMode run_mode;
GimpDrawable *drawable;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
@ -218,8 +218,10 @@ run (const gchar *name,
}
else
{
g_message (_("Cannot operate on indexed color images."));
status = GIMP_PDB_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
*nreturn_vals = 2;
values[1].type = GIMP_PDB_STRING;
values[1].data.d_string = _("Cannot operate on indexed color images.");
}
}

View File

@ -827,7 +827,7 @@ plugin_run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
static GimpParam values[2];
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gchar *path;
@ -961,8 +961,10 @@ plugin_run (const gchar *name,
}
else
{
g_message (_("Cannot operate on indexed color images."));
status = GIMP_PDB_EXECUTION_ERROR;
status = GIMP_PDB_EXECUTION_ERROR;
*nreturn_vals = 2;
values[1].type = GIMP_PDB_STRING;
values[1].data.d_string = _("Cannot operate on indexed color images.");
}
}