+
+ ResetIter();
+ DisplayStaticImage();
+}
+
+void wxAnimationCtrl::SetInactiveBitmap(const wxBitmap &bmp)
+{
+ wxAnimationCtrlBase::SetInactiveBitmap(bmp);
+
+ // update the pixbuf associated with m_widget now...
+ if (!IsPlaying())
+ DisplayStaticImage();
+}
+
+void wxAnimationCtrl::DisplayStaticImage()
+{
+ wxASSERT(!IsPlaying());
+
+ if (m_bmpStatic.IsOk())
+ {
+ // show inactive bitmap
+ GdkBitmap *mask = (GdkBitmap *) NULL;
+ if (m_bmpStatic.GetMask())
+ mask = m_bmpStatic.GetMask()->GetBitmap();
+
+ if (m_bmpStatic.HasPixbuf())
+ {
+ gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget),
+ m_bmpStatic.GetPixbuf());
+ }
+ else
+ {
+ gtk_image_set_from_pixmap(GTK_IMAGE(m_widget),
+ m_bmpStatic.GetPixmap(), mask);
+ }
+ }
+ else
+ {
+ if (m_anim)
+ {
+ // even if not clearly documented, gdk_pixbuf_animation_get_static_image()
+ // always returns the first frame of the animation
+ gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget),
+ gdk_pixbuf_animation_get_static_image(m_anim));
+ }
+ else
+ {
+ ClearToBackgroundColour();
+ }
+ }