Animation problem



Hi, I have a problem with keeping an animated gif running while the gtk main loop is blocked.
The gif (called waitImage) is placed on a GtkDialog (waitDialog). The GdkPixbufAnimation "behind" waitImage 
is called waitImageAnimated.
I tried to do it like this:

while(...) {
  gtk_widget_queue_draw(GTK_WIDGET (GTK_DIALOG (waitDlg)->vbox));
  gdk_window_process_updates (gtk_widget_get_parent_window (GTK_DIALOG
                                              (waitDlg)->vbox), true);
  waitImagePixbuf = gdk_pixbuf_animation_iter_get_pixbuf(
                  gdk_pixbuf_animation_get_iter(waitImageAnimated, NULL));
  gtk_image_set_from_pixbuf(GTK_IMAGE (waitImage),waitImagePixbuf);
}

But this doesn't work. The gif doesn't run.
Does anybody know, how to do it correctly?
A solution without memory leaks would be especially nice ;-)

Thank you, dasaspock
-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl



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