RE: Pictureproblem



You have to use the gtk_main_iterator before the sleep. Samething with
the progress bar. gdk_flush may not work.

   while (gtk_events_pending()) gtk_main_iteration ();
   sleep(???); // do something take a long time.



-----Original Message-----
From: gtk-app-devel-list-admin gnome org
[mailto:gtk-app-devel-list-admin gnome org] On Behalf Of Nix
Sent: Monday, November 10, 2003 12:51 AM
To: Christian Schneider
Cc: gtk-app-devel-list gnome org
Subject: Re: Pictureproblem

On Sun, 2003-11-09 at 04:54, Christian Schneider wrote:
gboolean drawingarea_expose_event (...)
{
...
pixbufdrawingareadarstellung (..., picture1, ...);
sleep (3000);
pixbufdrawingareadarstellung (..., picture2, ...);
...
}

But if I start my program I will only see picture2
after 3 seconds.
I think I know why this occur. But I don't know how to
solve my problem.

Try gdk_flush () .

Plus, you shouldn't be using sleep.  Use gtk_timeout_add ().

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]