Commit dd4042df authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

Fix stuck progress bars (bug #393832):

2007-03-16  Michael Natterer  <mitch@gimp.org>

	Fix stuck progress bars (bug #393832):

	* app/plug-in/gimpplugin-progress.[ch] (gimp_plug_in_progress_end):
	added PlugInProcFrame parameter instead of blindly using the topmost
	in the procedure stack...

	* app/plug-in/gimppluginprocframe.c
	(gimp_plug_in_proc_frame_dispose): ...because we call it from here,
	when the proc_frame is already removed from the procedure stack.

	Unrelated:

	* plug-ins/script-fu/scripts/difference-clouds.scm: use
	RUN-INTERACTVE instead of 0, added (gimp-displays-flush)

	* plug-ins/common/snoise.c (solid_noide): update the progress to
	1.0 after rendering.


svn path=/trunk/; revision=22131
parent 30508fef
2007-03-16 Michael Natterer <mitch@gimp.org>
Fix stuck progress bars (bug #393832):
* app/plug-in/gimpplugin-progress.[ch] (gimp_plug_in_progress_end):
added PlugInProcFrame parameter instead of blindly using the topmost
in the procedure stack...
* app/plug-in/gimppluginprocframe.c
(gimp_plug_in_proc_frame_dispose): ...because we call it from here,
when the proc_frame is already removed from the procedure stack.
Unrelated:
* plug-ins/script-fu/scripts/difference-clouds.scm: use
RUN-INTERACTVE instead of 0, added (gimp-displays-flush)
* plug-ins/common/snoise.c (solid_noide): update the progress to
1.0 after rendering.
2007-03-15 Michael Natterer <mitch@gimp.org>
* data/brushes/Makefile.am: group files by type.
......@@ -136,13 +136,11 @@ gimp_plug_in_progress_start (GimpPlugIn *plug_in,
}
void
gimp_plug_in_progress_end (GimpPlugIn *plug_in)
gimp_plug_in_progress_end (GimpPlugIn *plug_in,
GimpPlugInProcFrame *proc_frame)
{
GimpPlugInProcFrame *proc_frame;
g_return_if_fail (GIMP_IS_PLUG_IN (plug_in));
proc_frame = gimp_plug_in_get_proc_frame (plug_in);
g_return_if_fail (proc_frame != NULL);
if (proc_frame->progress)
{
......@@ -263,7 +261,7 @@ gimp_plug_in_progress_install (GimpPlugIn *plug_in,
if (proc_frame->progress)
{
gimp_plug_in_progress_end (plug_in);
gimp_plug_in_progress_end (plug_in, proc_frame);
if (proc_frame->progress)
{
......@@ -296,7 +294,7 @@ gimp_plug_in_progress_uninstall (GimpPlugIn *plug_in,
if (GIMP_IS_PDB_PROGRESS (proc_frame->progress))
{
gimp_plug_in_progress_end (plug_in);
gimp_plug_in_progress_end (plug_in, proc_frame);
g_object_unref (proc_frame->progress);
proc_frame->progress = NULL;
......
......@@ -22,19 +22,20 @@
#define __GIMP_PLUG_IN_PROGRESS_H__
gint gimp_plug_in_progress_attach (GimpProgress *progress);
gint gimp_plug_in_progress_detach (GimpProgress *progress);
gint gimp_plug_in_progress_attach (GimpProgress *progress);
gint gimp_plug_in_progress_detach (GimpProgress *progress);
void gimp_plug_in_progress_start (GimpPlugIn *plug_in,
const gchar *message,
GimpObject *display);
void gimp_plug_in_progress_end (GimpPlugIn *plug_in);
void gimp_plug_in_progress_set_text (GimpPlugIn *plug_in,
const gchar *message);
void gimp_plug_in_progress_set_value (GimpPlugIn *plug_in,
gdouble percentage);
void gimp_plug_in_progress_pulse (GimpPlugIn *plug_in);
guint32 gimp_plug_in_progress_get_window (GimpPlugIn *plug_in);
void gimp_plug_in_progress_start (GimpPlugIn *plug_in,
const gchar *message,
GimpObject *display);
void gimp_plug_in_progress_end (GimpPlugIn *plug_in,
GimpPlugInProcFrame *proc_frame);
void gimp_plug_in_progress_set_text (GimpPlugIn *plug_in,
const gchar *message);
void gimp_plug_in_progress_set_value (GimpPlugIn *plug_in,
gdouble percentage);
void gimp_plug_in_progress_pulse (GimpPlugIn *plug_in);
guint32 gimp_plug_in_progress_get_window (GimpPlugIn *plug_in);
gboolean gimp_plug_in_progress_install (GimpPlugIn *plug_in,
const gchar *progress_callback);
......
......@@ -91,7 +91,7 @@ gimp_plug_in_proc_frame_dispose (GimpPlugInProcFrame *proc_frame,
if (proc_frame->progress)
{
gimp_plug_in_progress_end (plug_in);
gimp_plug_in_progress_end (plug_in, proc_frame);
if (proc_frame->progress)
{
......
......@@ -361,6 +361,8 @@ solid_noise (GimpDrawable *drawable,
if (i % 16 == 0)
gimp_progress_update ((gdouble) progress / (gdouble) max_progress);
}
gimp_progress_update (1.0);
}
/* Update the drawable */
......
......@@ -53,12 +53,14 @@
(gimp-layer-translate diff-clouds offset-x offset-y))
; Show the solid noise dialog
(plug-in-solid-noise 0 image diff-clouds 0 0 0 1 4.0 4.0)
(plug-in-solid-noise RUN-INTERACTIVE image diff-clouds 0 0 0 1 4.0 4.0)
; Merge the clouds layer with the layer below
(gimp-image-merge-down image diff-clouds EXPAND-AS-NECESSARY)
(gimp-image-undo-group-end image)
(gimp-displays-flush)
)
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment