X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/155ecd4c4221d3bbc7aa93d472d11948f21d21ab..9a7b7798282622e445efc3318b6c85ff0bed9af8:/src/x11/dataobj.cpp?ds=sidebyside diff --git a/src/x11/dataobj.cpp b/src/x11/dataobj.cpp index 1f2d5aaf09..b9b8f7a37d 100644 --- a/src/x11/dataobj.cpp +++ b/src/x11/dataobj.cpp @@ -57,12 +57,6 @@ wxDataFormat::wxDataFormat( wxDataFormatId type ) SetType( type ); } -wxDataFormat::wxDataFormat( const wxChar *id ) -{ - PrepareFormats(); - SetId( id ); -} - wxDataFormat::wxDataFormat( const wxString &id ) { PrepareFormats(); @@ -80,7 +74,7 @@ void wxDataFormat::SetType( wxDataFormatId type ) PrepareFormats(); m_type = type; - if (m_type == wxDF_TEXT) + if (m_type == wxDF_TEXT || m_type == wxDF_UNICODETEXT) m_format = g_textAtom; else if (m_type == wxDF_BITMAP) @@ -129,13 +123,12 @@ void wxDataFormat::SetId( NativeFormat format ) m_type = wxDF_PRIVATE; } -void wxDataFormat::SetId( const wxChar *id ) +void wxDataFormat::SetId( const wxString& id ) { #if !wxUSE_NANOX PrepareFormats(); m_type = wxDF_PRIVATE; - wxString tmp( id ); - m_format = XInternAtom( (Display*) wxGetDisplay(), tmp.ToAscii(), FALSE ); + m_format = XInternAtom( (Display*) wxGetDisplay(), id.ToAscii(), FALSE ); #endif }