From 2b2f5c24fe265cf5d299f8e492f10ec32aeda411 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Fri, 4 May 2007 10:46:48 +0000 Subject: [PATCH] reduced the number of progress updates. 2007-05-04 Sven Neumann * plug-ins/common/dog.c: reduced the number of progress updates. svn path=/trunk/; revision=22405 --- ChangeLog | 4 ++++ plug-ins/common/dog.c | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 95a5917a2d..5670419823 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-05-04 Sven Neumann + + * plug-ins/common/dog.c: reduced the number of progress updates. + 2007-05-04 Sven Neumann * plug-ins/common/gauss.c (gauss_rle): fixed a bug in my last change. diff --git a/plug-ins/common/dog.c b/plug-ins/common/dog.c index e2de661b26..781280eb13 100755 --- a/plug-ins/common/dog.c +++ b/plug-ins/common/dog.c @@ -197,6 +197,7 @@ run (const gchar *name, /* Make sure all the arguments are there! */ if (nparams != 7) status = GIMP_PDB_CALLING_ERROR; + if (status == GIMP_PDB_SUCCESS) { dogvals.inner = param[3].data.d_float; @@ -219,7 +220,9 @@ run (const gchar *name, } } else - status = GIMP_PDB_CALLING_ERROR; + { + status = GIMP_PDB_CALLING_ERROR; + } if (status == GIMP_PDB_SUCCESS) { @@ -229,13 +232,15 @@ run (const gchar *name, { gimp_progress_init (_("DoG Edge Detect")); - /* run the Difference of Gaussians */ gimp_image_undo_group_start (image_ID); + dog (image_ID, drawable, dogvals.inner, dogvals.outer, TRUE); gimp_image_undo_group_end (image_ID); + gimp_progress_update (1.0); + /* Store data */ if (run_mode == GIMP_RUN_INTERACTIVE) gimp_set_data (PLUG_IN_PROC, &dogvals, sizeof (DoGValues)); @@ -764,7 +769,7 @@ gauss_rle (GimpDrawable *drawable, { progress += height; - if ((col % 20) == 0) + if ((col % 32) == 0) gimp_progress_update (0.5 * (pass + (progress / max_progress))); } } @@ -833,7 +838,7 @@ gauss_rle (GimpDrawable *drawable, { progress += width; - if ((row % 20) == 0) + if ((row % 32) == 0) gimp_progress_update (0.5 * (pass + (progress / max_progress))); } }