From 6696cb77432c104c165506bc5c4c2d3cfdcd3b5e Mon Sep 17 00:00:00 2001 From: Seth Burgess Date: Sat, 31 Jul 2004 04:34:33 +0000 Subject: [PATCH] plug-ins/common/gauss.c: Add ability to pop up a dialog if called from pdb with RUN_INTERACTIVE. --- ChangeLog | 5 +++++ plug-ins/common/gauss.c | 30 +++++++++++++++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab91be9d12..f35fc7dff9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-07-30 Seth Burgess + + * plug-ins/common/gauss.c: added some non-interactive modes (if called + from the pdb with RUN_INTERACTIVE). + 2004-07-31 Sven Neumann * libgimpwidgets/gimpcolorselect.c: minor cleanup. diff --git a/plug-ins/common/gauss.c b/plug-ins/common/gauss.c index 63dd8fae80..543d693ed9 100644 --- a/plug-ins/common/gauss.c +++ b/plug-ins/common/gauss.c @@ -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;