X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b135950383287e57c465f19879238fb7150a2fa..dac831bb08e6cbf28e8fcfd2bf68939e929200f8:/src/motif/clipbrd.cpp?ds=inline diff --git a/src/motif/clipbrd.cpp b/src/motif/clipbrd.cpp index d52fca5d5f..6a38390943 100644 --- a/src/motif/clipbrd.cpp +++ b/src/motif/clipbrd.cpp @@ -32,7 +32,9 @@ #include "wx/dataobj.h" #endif -#include "wx/ptr_scpd.h" +#include "wx/scopedarray.h" + +typedef wxScopedArray wxDataFormatScopedArray; #ifdef __VMS__ #pragma message disable nosimpint @@ -149,7 +151,7 @@ wxDataFormat wxRegisterClipboardFormat(char *WXUNUSED(formatName)) bool wxGetClipboardFormatName(const wxDataFormat& dataFormat, char *formatName, int maxCount) { - wxStrncpy( formatName, dataFormat.GetId().c_str(), maxCount ); + wxStrlcpy( formatName, dataFormat.GetId().c_str(), maxCount ); return true; } @@ -233,9 +235,6 @@ bool wxClipboard::SetData( wxDataObject *data ) return AddData( data ); } -wxDECLARE_SCOPED_ARRAY( wxDataFormat, wxDataFormatScopedArray ) -wxDEFINE_SCOPED_ARRAY( wxDataFormat, wxDataFormatScopedArray ) - #if wxCHECK_LESSTIF() void wxClipboardCallback( Widget xwidget, int* data_id, int* priv, int* WXUNUSED(reason) ) @@ -287,7 +286,7 @@ bool wxClipboard::AddData( wxDataObject *data ) Display* xdisplay = wxGlobalDisplay(); Widget xwidget = (Widget)wxTheApp->GetTopLevelRealizedWidget(); Window xwindow = XtWindow( xwidget ); - wxXmString label( wxTheApp->GetAppName() ); + wxXmString label( wxTheApp->GetAppDisplayName() ); Time timestamp = XtLastTimestampProcessed( xdisplay ); long itemId; @@ -312,7 +311,7 @@ bool wxClipboard::AddData( wxDataObject *data ) wxString id = dfarr[i].GetId(); while( ( retval = XmClipboardCopy( xdisplay, xwindow, itemId, - wxConstCast(id.mb_str(), char), + id.char_str(), NULL, size, i, &data_id ) ) == XmClipboardLocked ); @@ -461,7 +460,7 @@ bool wxClipboard::GetData( wxDataObject& data ) wxString id = chosenFormat.GetId(); while( ( retval = XmClipboardInquireLength( xdisplay, xwindow, - wxConstCast(id.mb_str(), char), + id.char_str(), &length ) ) == XmClipboardLocked ); if( retval != XmClipboardSuccess ) @@ -470,7 +469,7 @@ bool wxClipboard::GetData( wxDataObject& data ) wxCharBuffer buf(length); while( ( retval = XmClipboardRetrieve( xdisplay, xwindow, - wxConstCast(id.mb_str(), char), + id.char_str(), (XtPointer)buf.data(), length, &dummy1, &dummy2 ) ) == XmClipboardLocked );