Re: hanging dialogs
- From: Sven Neumann <sven gimp org>
- To: Jeff Shipman <shippy nmt edu>
- Cc: GTK List <gtk-list gnome org>
- Subject: Re: hanging dialogs
- Date: 15 Feb 2001 10:23:34 +0100
Hi,
Jeff Shipman <shippy nmt edu> writes:
> The problem
> comes along when I want to update a progress bar
> and label in the dialog from the function I'm calling
> on every member in a GList (using g_list_foreach()).
How do you suppose the GTK+ main loop to update your
widgets while you are inside a signal handler? There's
only one process running and that process is busy with
your signal handler. Once it is completed the main loop
can process the pending events. There are several possible
solutions to your problem:
- Divide the work into smaller pieces that get called
from the idle loop so the UI stays responsive.
- Explicetely call gtk_main_iteration().
- Do the heavy work in an extra thread.
I wouldn't advise you to fork here, a thread should do, but
actually you should be able to get this done with a single
process unless some of the operations you need to do might
block.
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]