]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/clipbrd.cpp
Only test for centre flag of minor direction and ignore the other in wxBoxSizer ...
[wxWidgets.git] / src / motif / clipbrd.cpp
index 08c3f81d81300f894fa4867d94fc1ee21ede76f4..936328d7cf1f12aa418c45344309396cdd9fd92f 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/app.h"
+    #include "wx/utils.h"
+    #include "wx/bitmap.h"
+    #include "wx/dataobj.h"
 #endif
 
-#include "wx/bitmap.h"
-#include "wx/utils.h"
-#include "wx/dataobj.h"
 #include "wx/ptr_scpd.h"
 
 #ifdef __VMS__
@@ -149,7 +149,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;
 }
@@ -287,7 +287,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 +312,7 @@ bool wxClipboard::AddData( wxDataObject *data )
         wxString id = dfarr[i].GetId();
 
         while( ( retval = XmClipboardCopy( xdisplay, xwindow, itemId,
-                                           wxConstCast(id.c_str(), char),
+                                           id.char_str(),
                                            NULL, size, i, &data_id ) )
                == XmClipboardLocked );
 
@@ -461,7 +461,7 @@ bool wxClipboard::GetData( wxDataObject& data )
     wxString id = chosenFormat.GetId();
 
     while( ( retval = XmClipboardInquireLength( xdisplay, xwindow,
-                                                wxConstCast(id.c_str(), char),
+                                                id.char_str(),
                                                 &length ) )
            == XmClipboardLocked );
     if( retval != XmClipboardSuccess )
@@ -470,7 +470,7 @@ bool wxClipboard::GetData( wxDataObject& data )
     wxCharBuffer buf(length);
 
     while( ( retval = XmClipboardRetrieve( xdisplay, xwindow,
-                                           wxConstCast(id.c_str(), char),
+                                           id.char_str(),
                                            (XtPointer)buf.data(),
                                            length, &dummy1, &dummy2 ) )
            == XmClipboardLocked );