]> git.saurik.com Git - wxWidgets.git/commitdiff
fixes as per http://thread.gmane.org/gmane.comp.lib.wxwidgets.devel/92325
authorChris Elliott <biol75@york.ac.uk>
Wed, 10 Oct 2007 07:44:34 +0000 (07:44 +0000)
committerChris Elliott <biol75@york.ac.uk>
Wed, 10 Oct 2007 07:44:34 +0000 (07:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/controls/controls.cpp
samples/grid/griddemo.cpp
samples/listctrl/listtest.cpp
samples/mdi/mdi.cpp
samples/mediaplayer/mediaplayer.cpp
samples/typetest/typetest.cpp

index 6dd4a8fd87dbccd7b8701f883e8ac2647c3ebc9e..2ab570ed62eef23d3ab9317718ce054b94f6dc87 100644 (file)
@@ -1314,8 +1314,9 @@ void MyPanel::OnListBoxButtons( wxCommandEvent &event )
 
 static const wxChar *GetDataString(wxClientData *data)
 {
-    return data ? wx_static_cast(wxStringClientData *, data)->GetData().c_str()
-                : _T("none");
+    return (
+      data ? wx_static_cast(wxStringClientData *, data)->GetData() : wxString("none")
+    ).c_str();
 }
 
 void MyPanel::OnChoice( wxCommandEvent &event )
index 4ad34e9774fd33fd3725efa33319163f196b2f2e..abdcfee872e40aa43b6628f686a9bd75a1a97994 100644 (file)
@@ -961,8 +961,8 @@ void GridFrame::OnShowSelection(wxCommandEvent& WXUNUSED(event))
                     single = _T("column");
                 }
 
-                const wxArrayInt sels(rows ? grid->GetSelectedRows()
-                                           : grid->GetSelectedCols());
+                const wxArrayInt sels((const wxArrayInt)(rows ? grid->GetSelectedRows()
+                                           : grid->GetSelectedCols()));
                 size_t count = sels.size();
                 wxLogMessage(_T("%lu %s selected:"),
                              (unsigned long)count, plural);
index c4c71463accab43a6f9555011915b3a081ad216a..ebfa7accb6c4fd723be820803ddebab81e82f701 100644 (file)
@@ -821,8 +821,12 @@ void MyListCtrl::OnBeginLabelEdit(wxListEvent& event)
 void MyListCtrl::OnEndLabelEdit(wxListEvent& event)
 {
     wxLogMessage( wxT("OnEndLabelEdit: %s"),
-                  event.IsEditCancelled() ? _T("[cancelled]")
-                                          : event.m_item.m_text.c_str());
+        (
+            event.IsEditCancelled() ? 
+            wxString("[cancelled]") : 
+            event.m_item.m_text
+        ).c_str()
+    );
 }
 
 void MyListCtrl::OnDeleteItem(wxListEvent& event)
index 49336c75f546fcd489095aeee6f6ee0f9d984c95..b06f1bf25762fb2ad53beb29f1d34fa6defcb63f 100644 (file)
@@ -516,8 +516,13 @@ void MyChild::OnPaste(wxCommandEvent& WXUNUSED(event))
 {
     wxClipboardLocker lock;
     wxTextDataObject data;
-    canvas->SetText(wxTheClipboard->GetData(data) ? data.GetText().c_str()
-                                                  : _T("No text on clipboard"));
+    canvas->SetText(
+        (
+            wxTheClipboard->GetData(data) ? 
+            data.GetText() : 
+            wxString("No text on clipboard")
+        ).c_str()
+    );
 }
 
 void MyChild::OnUpdatePaste(wxUpdateUIEvent& event)
index 7b94f1ff19feeb92fea3c06c0f70c8448ca938f6..aeba330fc55c2be2cf8ff862c0e51975d344a215 100644 (file)
@@ -428,7 +428,7 @@ bool wxMediaPlayerApp::OnInit()
     cmdLineDesc[0].kind = wxCMD_LINE_PARAM;
     cmdLineDesc[0].shortName = NULL;
     cmdLineDesc[0].longName = NULL;
-    cmdLineDesc[0].description = wxT("input files");
+    cmdLineDesc[0].description = "input files";
     cmdLineDesc[0].type = wxCMD_LINE_VAL_STRING;
     cmdLineDesc[0].flags = wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE;
 
index 1e5ce86779caf6e921118e01285d8415f36eb345..2dffb5f4176deeca458dbcf73bcafa9c37d17f56 100644 (file)
@@ -955,11 +955,10 @@ void MyApp::DoMIMEDemo(wxCommandEvent& WXUNUSED(event))
             filetype->GetOpenCommand(&open, params);
 
             textCtrl << _T("MIME information about extension '") << ext << _T('\n')
-                     << _T("\tMIME type: ") << ( !type ? wxT("unknown")
-                                                   : type.c_str() ) << _T('\n')
-                     << _T("\tDescription: ") << ( !desc ? wxEmptyString : desc.c_str() )
+                     << _T("\tMIME type: ") << ( !type ? wxString("unknown") : type ) << _T('\n')
+                     << _T("\tDescription: ") << ( !desc ? wxString(wxEmptyString) : desc )
                         << _T('\n')
-                     << _T("\tCommand to open: ") << ( !open ? wxT("no") : open.c_str() )
+                     << _T("\tCommand to open: ") << ( !open ? wxString("no") : open )
                         << _T('\n');
 
             delete filetype;