X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0cf3e587a2ec542ba1eb6e03a84c54edefae1881..d8eff331e23435d9d8d6483a40f6fd9997a13f87:/samples/widgets/filectrl.cpp?ds=sidebyside diff --git a/samples/widgets/filectrl.cpp b/samples/widgets/filectrl.cpp index 4fd459b08c..a27367db31 100644 --- a/samples/widgets/filectrl.cpp +++ b/samples/widgets/filectrl.cpp @@ -177,21 +177,21 @@ void FileCtrlWidgetsPage::CreateContent() 0, wxALL | wxEXPAND , 5 ); wxSizer *sizerUseFlags = - new wxStaticBoxSizer( wxVERTICAL, this, _T( "&Flags" ) ); + new wxStaticBoxSizer( wxVERTICAL, this, wxT( "&Flags" ) ); - m_chkMultiple = CreateCheckBoxAndAddToSizer( sizerUseFlags, _T( "wxFC_MULTIPLE" ) ); - m_chkNoShowHidden = CreateCheckBoxAndAddToSizer( sizerUseFlags, _T( "wxFC_NOSHOWHIDDEN" ) ); + m_chkMultiple = CreateCheckBoxAndAddToSizer( sizerUseFlags, wxT( "wxFC_MULTIPLE" ) ); + m_chkNoShowHidden = CreateCheckBoxAndAddToSizer( sizerUseFlags, wxT( "wxFC_NOSHOWHIDDEN" ) ); sizerLeft->Add( sizerUseFlags, wxSizerFlags().Expand().Border() ); wxSizer *sizerFilters = - new wxStaticBoxSizer( wxVERTICAL, this, _T( "&Filters" ) ); + new wxStaticBoxSizer( wxVERTICAL, this, wxT( "&Filters" ) ); m_fltr[0] = CreateCheckBoxAndAddToSizer( sizerFilters, wxString::Format( wxT( "all files (%s)|%s" ), wxFileSelectorDefaultWildcardStr, wxFileSelectorDefaultWildcardStr ) ); m_fltr[1] = CreateCheckBoxAndAddToSizer( sizerFilters, wxT( "C++ files (*.cpp; *.h)|*.cpp;*.h" ) ); m_fltr[2] = CreateCheckBoxAndAddToSizer( sizerFilters, wxT( "PNG images (*.png)|*.png" ) ); sizerLeft->Add( sizerFilters, wxSizerFlags().Expand().Border() ); - wxButton *btn = new wxButton( this, FileCtrlPage_Reset, _T( "&Reset" ) ); + wxButton *btn = new wxButton( this, FileCtrlPage_Reset, wxT( "&Reset" ) ); sizerLeft->Add( btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15 ); // right pane @@ -306,32 +306,16 @@ 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(), ' ')); } }