X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0cf3e587a2ec542ba1eb6e03a84c54edefae1881..41f6f17d01562aa09bdbcc6b02241b62f1d06b75:/samples/widgets/filectrl.cpp?ds=sidebyside diff --git a/samples/widgets/filectrl.cpp b/samples/widgets/filectrl.cpp index 4fd459b08c..4a83c69830 100644 --- a/samples/widgets/filectrl.cpp +++ b/samples/widgets/filectrl.cpp @@ -306,33 +306,11 @@ void FileCtrlWidgetsPage::OnRadioBox( wxCommandEvent& WXUNUSED( event ) ) void FileCtrlWidgetsPage::OnFileCtrl( wxFileCtrlEvent& event ) { if ( event.GetEventType() == wxEVT_FILECTRL_FOLDERCHANGED ) - wxLogMessage( _T( "Folder changed event, new folder: %s" ), event.GetDirectory() ); + wxLogMessage("Folder changed event, new folder: %s", event.GetDirectory()); else if ( event.GetEventType() == wxEVT_FILECTRL_FILEACTIVATED ) - { - wxLogMessage( _T( "File activated event: " ) ); - wxString filesString; - - const wxArrayString &files = event.GetFiles(); - for ( unsigned int i = 0; i < files.Count(); i ++ ) - { - filesString += files[i] + _T( " " ); - } - - wxLogMessage( filesString ); - } + wxLogMessage("File activated event: %s", wxJoin(event.GetFiles(), ' ')); else if ( event.GetEventType() == wxEVT_FILECTRL_SELECTIONCHANGED ) - { - wxLogMessage( _T( "Selection changed event: " ) ); - wxString filesString; - - const wxArrayString &files = event.GetFiles(); - for ( unsigned int i = 0; i < files.Count(); i ++ ) - { - filesString += files[i] + _T( " " ); - } - - wxLogMessage( filesString ); - } + wxLogMessage("Selection changed event: %s", wxJoin(event.GetFiles(), ' ')); } #endif // wxUSE_FILECTRL