From da8cf7236e48410e095c2ff50efe0c013ed89078 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 14 Sep 2005 14:21:16 +0000 Subject: [PATCH] more non-const string literal warnings correction git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif/msgdlg.cpp | 2 +- src/motif/radiobox.cpp | 2 +- src/motif/textctrl.cpp | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/motif/msgdlg.cpp b/src/motif/msgdlg.cpp index 63ea92e899..6611b48b27 100644 --- a/src/motif/msgdlg.cpp +++ b/src/motif/msgdlg.cpp @@ -185,7 +185,7 @@ int wxMessageDialog::ShowModal() // do create message box - Widget wMsgBox = (*dialogCreateFunction)(wParent, "", args, ac); + Widget wMsgBox = (*dialogCreateFunction)(wParent, wxMOTIF_STR(""), args, ac); wxCHECK_MSG( wMsgBox, wxID_CANCEL, "msg box creation failed" ); diff --git a/src/motif/radiobox.cpp b/src/motif/radiobox.cpp index 0788c3a686..e10823aa4b 100644 --- a/src/motif/radiobox.cpp +++ b/src/motif/radiobox.cpp @@ -119,7 +119,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title, XtSetArg (args[2], XmNadjustLast, False); Widget radioBoxWidget = - XmCreateRadioBox ((Widget)m_mainWidget, "radioBoxWidget", args, 3); + XmCreateRadioBox ((Widget)m_mainWidget, wxMOTIF_STR("radioBoxWidget"), args, 3); m_radioButtons.reserve(n); m_radioButtonLabels.reserve(n); diff --git a/src/motif/textctrl.cpp b/src/motif/textctrl.cpp index f3c688fd4c..4e9b4655cb 100644 --- a/src/motif/textctrl.cpp +++ b/src/motif/textctrl.cpp @@ -407,7 +407,7 @@ void wxTextCtrl::AppendText(const wxString& text) void wxTextCtrl::Clear() { - XmTextSetString ((Widget) m_mainWidget, ""); + XmTextSetString ((Widget) m_mainWidget, wxMOTIF_STR("")); m_modified = false; } @@ -661,12 +661,13 @@ wxSize wxDoGetSingleTextCtrlBestSize( Widget textWidget, NULL ); if( !value ) - value = "|"; + value = wxMOTIF_STR("|"); int x, y; window->GetTextExtent( value, &x, &y ); - if( x < 100 ) x = 100; + if( x < 100 ) + x = 100; return wxSize( x + 2 * xmargin + 2 * highlight + 2 * shadow, // MBN: +2 necessary: Lesstif bug or mine?