plug-ins/common/gauss.c:

Add ability to pop up a dialog if called from pdb with RUN_INTERACTIVE.
This commit is contained in:
Seth Burgess
2004-07-31 04:34:33 +00:00
parent eef37e007d
commit 6696cb7743
2 changed files with 30 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2004-07-30 Seth Burgess <sjburges@gimp.org>
* plug-ins/common/gauss.c: added some non-interactive modes (if called
from the pdb with RUN_INTERACTIVE).
2004-07-31 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpcolorselect.c: minor cleanup.

View File

@ -303,7 +303,7 @@ run (const gchar *name,
break;
}
}
else if (strcmp (name, "plug_in_gauss_iir") == 0) /* can only be noninteractive */
else if (strcmp (name, "plug_in_gauss_iir") == 0)
{
if (nparams != 6)
status = GIMP_PDB_CALLING_ERROR;
@ -316,8 +316,13 @@ run (const gchar *name,
}
if (radius <= 0.0)
status = GIMP_PDB_CALLING_ERROR;
if (run_mode==GIMP_RUN_INTERACTIVE)
{
if (! gauss_dialog (image_ID, drawable))
return;
}
}
else if (strcmp (name, "plug_in_gauss_iir2") == 0) /* can only be noninteractive */
else if (strcmp (name, "plug_in_gauss_iir2") == 0)
{
if (nparams != 5)
status = GIMP_PDB_CALLING_ERROR;
@ -328,9 +333,14 @@ run (const gchar *name,
bvals.method = BLUR_IIR;
}
if (bvals.horizontal <= 0.0 && bvals.vertical <= 0.0)
status = GIMP_PDB_CALLING_ERROR;
status = GIMP_PDB_CALLING_ERROR;
if (run_mode==GIMP_RUN_INTERACTIVE)
{
if (! gauss_dialog (image_ID, drawable))
return;
}
}
else if (strcmp (name, "plug_in_gauss_rle") == 0) /* can only be noninteractive */
else if (strcmp (name, "plug_in_gauss_rle") == 0)
{
if (nparams != 6)
status = GIMP_PDB_CALLING_ERROR;
@ -343,8 +353,13 @@ run (const gchar *name,
}
if (radius <= 0.0)
status = GIMP_PDB_CALLING_ERROR;
if (run_mode==GIMP_RUN_INTERACTIVE)
{
if (! gauss_dialog (image_ID, drawable))
return;
}
}
else if (strcmp (name, "plug_in_gauss_rle2") == 0) /* can only be noninteractive */
else if (strcmp (name, "plug_in_gauss_rle2") == 0)
{
if (nparams != 5)
status = GIMP_PDB_CALLING_ERROR;
@ -356,6 +371,11 @@ run (const gchar *name,
}
if (bvals.horizontal <= 0.0 && bvals.vertical <= 0.0)
status = GIMP_PDB_CALLING_ERROR;
if (run_mode==GIMP_RUN_INTERACTIVE)
{
if (! gauss_dialog (image_ID, drawable))
return;
}
}
else
status = GIMP_PDB_CALLING_ERROR;