X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/422d0ff0bec79832494fe4605ffdcf8e87ba6c03..6e2717981772a139d3cd9e51d497b13792fe662d:/contrib/samples/mmedia/mmboard.cpp diff --git a/contrib/samples/mmedia/mmboard.cpp b/contrib/samples/mmedia/mmboard.cpp index b39015d01f..91640f3018 100644 --- a/contrib/samples/mmedia/mmboard.cpp +++ b/contrib/samples/mmedia/mmboard.cpp @@ -16,9 +16,6 @@ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "mmboard.cpp" -#endif // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -198,7 +195,15 @@ wxUint8 MMBoardApp::TestMultimediaCaps() caps = 0; -#ifdef __UNIX__ +#ifdef __WIN32__ + // We test the Windows sound support. + + dev = new wxSoundStreamWin(); + if (dev->GetError() == wxSOUND_NOERROR) + caps |= MM_SOUND_WIN; + delete dev; + +#elif defined __UNIX__ // We now test the ESD support dev = new wxSoundStreamESD(); @@ -221,15 +226,6 @@ wxUint8 MMBoardApp::TestMultimediaCaps() } #endif -#endif - -#ifdef __WIN32__ - // We test the Windows sound support. - - dev = new wxSoundStreamWin(); - if (dev->GetError() == wxSOUND_NOERROR) - caps |= MM_SOUND_WIN; - delete dev; #endif return caps; @@ -297,13 +293,17 @@ MMBoardFrame::MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSi wxBoxSizer *infoSizer = new wxBoxSizer(wxVERTICAL); m_fileType = new wxStaticText(infoPanel, wxID_ANY, wxEmptyString); +#if wxUSE_STATLINE wxStaticLine *line = new wxStaticLine(infoPanel, wxID_ANY); +#endif // wxUSE_STATLINE m_infoText = new wxStaticText(infoPanel, wxID_ANY, wxEmptyString); UpdateInfoText(); infoSizer->Add(m_fileType, 0, wxGROW | wxALL, 1); +#if wxUSE_STATLINE infoSizer->Add(line, 0, wxGROW | wxCENTRE, 20); +#endif // wxUSE_STATLINE infoSizer->Add(m_infoText, 0, wxGROW | wxALL, 1); infoPanel->SetSizer(infoSizer); @@ -332,11 +332,17 @@ MMBoardFrame::MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSi // Top sizer m_sizer = new wxBoxSizer(wxVERTICAL); +#if wxUSE_STATLINE m_sizer->Add(new wxStaticLine(m_panel, wxID_ANY), 0, wxGROW | wxCENTRE, 0); +#endif // wxUSE_STATLINE m_sizer->Add(m_positionSlider, 0, wxCENTRE | wxGROW | wxALL, 2); +#if wxUSE_STATLINE m_sizer->Add(new wxStaticLine(m_panel, wxID_ANY), 0, wxGROW | wxCENTRE, 0); +#endif // wxUSE_STATLINE m_sizer->Add(buttonSizer, 0, wxALL, 0); +#if wxUSE_STATLINE m_sizer->Add(new wxStaticLine(m_panel, wxID_ANY), 0, wxGROW | wxCENTRE, 0); +#endif // wxUSE_STATLINE m_sizer->Add(infoPanel, 1, wxCENTRE | wxGROW, 0); m_panel->SetSizer(m_sizer); @@ -416,8 +422,10 @@ void MMBoardFrame::OnOpen(wxCommandEvent& WXUNUSED(event)) } // select a file to be opened +#if wxUSE_FILEDLG selected_file = wxLoadFileSelector(_T("multimedia"), _T("*"), NULL, this); - if (selected_file.IsNull()) +#endif // wxUSE_FILEDLG + if (selected_file.empty()) return; m_opened_file = MMBoardManager::Open(selected_file); @@ -581,4 +589,3 @@ void MMBoardFrame::OnSetPosition(wxCommandEvent& WXUNUSED(event)) UpdateMMedInfo(); } -