// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "dataobj.h"
#endif
#include "wx/mstream.h"
#include "wx/app.h"
#include "wx/image.h"
+#include "wx/log.h"
#include "wx/utils.h"
#include "wx/x11/private.h"
return wxEmptyString;
#else
char *t = XGetAtomName ((Display*) wxGetDisplay(), m_format);
- wxString ret( t ); // this will convert from ascii to Unicode
+ wxString ret = wxString::FromAscii( t );
if (t)
XFree( t );
return ret;
PrepareFormats();
m_type = wxDF_PRIVATE;
wxString tmp( id );
- m_format = XInternAtom( (Display*) wxGetDisplay(), wxMBSTRINGCAST tmp.mbc_str(), FALSE ); // what is the string cast for?
+ m_format = XInternAtom( (Display*) wxGetDisplay(), tmp.ToAscii(), FALSE );
#endif
}
return FALSE;
}
- m_bitmap = image.ConvertToBitmap();
+ m_bitmap = image;
return m_bitmap.Ok();
#else
if (!m_bitmap.Ok())
return;
- wxImage image( m_bitmap );
+ wxImage image = m_bitmap.ConvertToImage();
wxPNGHandler handler;
wxCountingOutputStream count;