X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f0c3a63a0eee38206d22d29db5c7eef260574ea..8998887c224924d5f6f4601597c162d6429495e1:/src/mac/carbon/dataobj.cpp diff --git a/src/mac/carbon/dataobj.cpp b/src/mac/carbon/dataobj.cpp index 64dc8053d0..bec4f2bd60 100644 --- a/src/mac/carbon/dataobj.cpp +++ b/src/mac/carbon/dataobj.cpp @@ -166,6 +166,19 @@ bool wxDataObject::IsSupportedFormat( } } +// ---------------------------------------------------------------------------- +// wxTextDataObject +// ---------------------------------------------------------------------------- + +#if wxUSE_UNICODE +void wxTextDataObject::GetAllFormats(wxDataFormat *formats, wxDataObjectBase::Direction dir) const +{ + *formats++ = wxDataFormat( wxDF_TEXT ); + *formats = wxDataFormat( wxDF_UNICODETEXT ); +} + +#endif + // ---------------------------------------------------------------------------- // wxFileDataObject // ---------------------------------------------------------------------------- @@ -206,7 +219,10 @@ bool wxFileDataObject::SetData( { m_filenames.Empty(); - AddFile(wxString::FromAscii((char*)pBuf)); + // only add if this is not an empty string + // we can therefore clear the list by just setting an empty string + if ( (*(char*)pBuf) != 0 ) + AddFile(wxString::FromAscii((char*)pBuf)); return TRUE; }