]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/animate.cpp
use HasFlag(wxXX) instead of GetWindowStyle() & wxXX; it's more readable
[wxWidgets.git] / src / gtk / animate.cpp
index 4c0f3dde707c738bb45a1b12be4ab4e658fb5da8..c6f7abe951466dd3e15bf5bf4609750ee604b3f7 100644 (file)
@@ -22,6 +22,8 @@
     #include "wx/stream.h"
 #endif
 
+#include "wx/wfstream.h"
+
 #include <gtk/gtk.h>
 
 
@@ -116,7 +118,8 @@ bool wxAnimation::Load(wxInputStream &stream, wxAnimationType type)
 
     if (!loader)
     {
-        wxLogDebug(wxT("Could not create the loader for '%s' animation type"), anim_type);
+        wxLogDebug(wxT("Could not create the loader for '%s' animation type: %s"),
+                   anim_type, error->message);
         return false;
     }
 
@@ -133,7 +136,7 @@ bool wxAnimation::Load(wxInputStream &stream, wxAnimationType type)
         if (!gdk_pixbuf_loader_write(loader, buf, stream.LastRead(), &error))
         {
             gdk_pixbuf_loader_close(loader, &error);
-            wxLogDebug(wxT("Could not write to the loader"));
+            wxLogDebug(wxT("Could not write to the loader: %s"), error->message);
             return false;
         }
     }
@@ -141,7 +144,7 @@ bool wxAnimation::Load(wxInputStream &stream, wxAnimationType type)
     // load complete
     if (!gdk_pixbuf_loader_close(loader, &error))
     {
-        wxLogDebug(wxT("Could not close the loader"));
+        wxLogDebug(wxT("Could not close the loader: %s"), error->message);
         return false;
     }
 
@@ -209,6 +212,7 @@ bool wxAnimationCtrl::Create( wxWindow *parent, wxWindowID id,
     SetWindowStyle(style);
 
     m_widget = gtk_image_new();
+    g_object_ref(m_widget);
     gtk_widget_show(m_widget);
 
     m_parent->DoAddChild( this );