Fwd: Animation problem



Hi, unfortunately nobody seems to have an idea so far.
Perhaps I can try it more simple:
How can I replace an Image by another one at runtime (without producing a memory leak)?
In fact this could help to solve the same problem. At least it's worth a try...

Thanks, dasaspock



-------- Original-Nachricht --------
Datum: Sun, 06 Aug 2006 03:40:53 +0200
Von: dasaspock gmx de
An: gtk-app-devel-list gnome org
Betreff: 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
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

-- 


"Feel free" â 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail



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