merged 2.4 branch into the trunk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user