]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dataobj.cpp
restore needed functions, wxMSW doesn't use wxBitmapHandlerBase
[wxWidgets.git] / src / gtk / dataobj.cpp
index c9e08da558ff2f556bea9f7c5b8daefe0288cb8b..ef24cfe8afc6dea778727548f8dcf1a211163f24 100644 (file)
 #ifndef WX_PRECOMP
     #include "wx/log.h"
     #include "wx/app.h"
+    #include "wx/image.h"
 #endif
 
-#include "wx/debug.h"
 #include "wx/mstream.h"
-#include "wx/image.h"
 #include "wx/uri.h"
 
-#include <gdk/gdk.h>
+#include "wx/gtk/private.h"
 
 //-------------------------------------------------------------------------
 // global data
@@ -111,10 +110,8 @@ wxDataFormatId wxDataFormat::GetType() const
 
 wxString wxDataFormat::GetId() const
 {
-    gchar* atom_name = gdk_atom_name( m_format );
-    wxString ret = wxString::FromAscii( atom_name );
-    g_free(atom_name);
-    return ret;
+    wxGtkString atom_name(gdk_atom_name(m_format));
+    return wxString::FromAscii(atom_name);
 }
 
 void wxDataFormat::SetId( NativeFormat format )
@@ -237,7 +234,7 @@ bool wxFileDataObject::GetDataHere(void *buf) const
         filenames += wxT("\r\n");
     }
 
-    memcpy( buf, filenames.mbc_str(), filenames.Len() + 1 );
+    memcpy( buf, filenames.mbc_str(), filenames.length() + 1 );
 
     return true;
 }
@@ -249,7 +246,7 @@ size_t wxFileDataObject::GetDataSize() const
     for (size_t i = 0; i < m_filenames.GetCount(); i++)
     {
         // This is junk in UTF-8
-        res += m_filenames[i].Len();
+        res += m_filenames[i].length();
         res += 5 + 2; // "file:" (5) + "\r\n" (2)
     }