]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/filectrl.cpp
return 0 (meaning the file is not seekable, as the docs now explain) instead of 4KB...
[wxWidgets.git] / samples / widgets / filectrl.cpp
index 4fd459b08c8225354233432dd3a54ba7e8222b47..4a83c698300fb65bd69837298c2ae3514a5807ac 100644 (file)
@@ -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