]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/sound/sound.cpp
Rebake everything using bakefile 0.2.9.
[wxWidgets.git] / samples / sound / sound.cpp
index ab745c89ace95b0a734b2eb6a4ddd1bcd1513496..abae8a45cef0ae0f991434e32c3cd04bb9f5f90e 100644 (file)
@@ -993,7 +993,13 @@ void MyFrame::OnSelectFile(wxCommandEvent& WXUNUSED(event))
 #if wxUSE_FILEDLG
     wxFileDialog dlg(this, wxT("Choose a sound file"),
                      wxEmptyString, wxEmptyString,
-                     wxT("WAV files (*.wav)|*.wav"), wxFD_OPEN|wxFD_CHANGE_DIR);
+                     wxString::Format
+                     (
+                         "WAV files (*.wav)|*.wav|All files (%s)|%s",
+                         wxFileSelectorDefaultWildcardStr,
+                         wxFileSelectorDefaultWildcardStr
+                     ),
+                     wxFD_OPEN|wxFD_CHANGE_DIR);
     if ( dlg.ShowModal() == wxID_OK )
     {
         m_soundFile = dlg.GetPath();
@@ -1002,8 +1008,7 @@ void MyFrame::OnSelectFile(wxCommandEvent& WXUNUSED(event))
 #endif // __WXMSW__
         m_useMemory = false;
 
-        delete m_sound;
-        m_sound = NULL;
+        wxDELETE(m_sound);
         NotifyUsingFile(m_soundFile);
     }
 #endif // wxUSE_FILEDLG
@@ -1026,8 +1031,7 @@ void MyFrame::OnSelectResource(wxCommandEvent& WXUNUSED(event))
     m_soundFile.clear();
     m_useMemory = false;
 
-    delete m_sound;
-    m_sound = NULL;
+    wxDELETE(m_sound);
 
     NotifyUsingFile(wxT("Windows WAV resource"));
 }