Re: Fwd: Animation problem



What you can do is use g_object_get_property on the image to get the reference (or, if it doesn't reference 
it, you may need to use g_object_ref), then use g_object_set_property to set the image.  This works on 
GtkImage, for example.

----- Original Message ----
From: dasaspock gmx de
To: gtk-app-devel-list gnome org
Sent: Sunday, August 6, 2006 8:33:41 AM
Subject: 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
_______________________________________________
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]