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 )
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);
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)
{
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)
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;
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;