X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8a01976c07a86e76f93a581d9ec737ab6c081a6..917be7ed065337e8a7a67615969ecaade9eea809:/src/mac/carbon/dataobj.cpp diff --git a/src/mac/carbon/dataobj.cpp b/src/mac/carbon/dataobj.cpp index ebf1f0dbed..bec4f2bd60 100644 --- a/src/mac/carbon/dataobj.cpp +++ b/src/mac/carbon/dataobj.cpp @@ -34,7 +34,7 @@ #include "wx/mstream.h" #include "wx/image.h" #include "wx/mac/private.h" -#include "Scrap.h" +#include // ---------------------------------------------------------------------------- // functions @@ -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; }