[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
gtk_events_pending(WAS: Re: How do I flush signals and gray out a menu item?)
- From: Patrick Panke <panke rocketmail com>
- To: gtk-app-devel-list redhat com
- Subject: gtk_events_pending(WAS: Re: How do I flush signals and gray out a menu item?)
- Date: Sun, 6 Jun 1999 02:46:27 -0700 (PDT)
---Giorgos Keramidas <keramida@hades.hell.gr> wrote:
>
> On Fri, Jun 04, 1999 at 11:23:58AM -0700, Jeff
Bergman wrote:
>
> | I am having two problems with an application
I am writing. One is
> | that when I do some time-consuming processing in
a loop none of the
> | messages get through until it is done. Is there
some call that will
>
> In the GTK+ FAQ we read:
>
> 4.12 Why doesn't my widget (e.g. progressbar)
update?
>
> You are probably doing all the changes within a
function without
> returning control to gtk_main. Most drawing
updates are only placed
> on a queue, which is processed within gtk_main.
You can force the
> drawing queue to be processed using something
like:
>
> while (gtk_events_pending())
> gtk_main_iteration();
>
> inside you're function that changes the widget.
>
> Maybe this proves helpful in your case, too.
Dunno, since I haven't
> tested this, but it looks like it would do the job.
>
The next paragraph in the gtkfaq states:
What the above snippet does is run all pending events
and high priority idle functions, then return
immediately (the drawing is done in a high priority
idle function).
But is seems that even low priority idle calls are
processed when this code is executed.
I also looked in the source (gmain.c), and
there seems to be no priority checking done
in g_main_iterate.
Any ideas how to do a real idle function that is only
called when there's really nothing else to do, when I
have to use the code from above several times?
Thanks a lot in advance.
Patrick
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]