X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0ace90958bccf60ac530ab127573599c78b7c522..d109c5849ed117966311a44875c97ae3d77b44e5:/src/x11/dataobj.cpp diff --git a/src/x11/dataobj.cpp b/src/x11/dataobj.cpp index 21e8776a29..c095c13aa2 100644 --- a/src/x11/dataobj.cpp +++ b/src/x11/dataobj.cpp @@ -7,7 +7,7 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "dataobj.h" #endif @@ -102,7 +102,7 @@ wxString wxDataFormat::GetId() const 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; @@ -132,7 +132,7 @@ void wxDataFormat::SetId( const wxChar *id ) 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 } @@ -351,7 +351,7 @@ bool wxBitmapDataObject::SetData(size_t size, const void *buf) return FALSE; } - m_bitmap = image.ConvertToBitmap(); + m_bitmap = image; return m_bitmap.Ok(); #else @@ -365,7 +365,7 @@ void wxBitmapDataObject::DoConvertToPng() if (!m_bitmap.Ok()) return; - wxImage image( m_bitmap ); + wxImage image = m_bitmap.ConvertToImage(); wxPNGHandler handler; wxCountingOutputStream count;