X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b10161eb6fcd0188cb635c45a3e4ddfa4636292..23a9a87c85d4e08cd96ab6ab95db64efe46a972f:/samples/mediaplayer/mediaplayer.cpp diff --git a/samples/mediaplayer/mediaplayer.cpp b/samples/mediaplayer/mediaplayer.cpp index 037f2fd8aa..1d1698363e 100644 --- a/samples/mediaplayer/mediaplayer.cpp +++ b/samples/mediaplayer/mediaplayer.cpp @@ -71,12 +71,12 @@ // they may be discarded by the linker (this definitely happens with MSVC) so // force linking them. You don't have to do this in your code if you don't plan // to use them, of course. -#ifdef __WXMSW__ +#if defined(__WXMSW__) && !defined(WXUSINGDLL) #include "wx/link.h" wxFORCE_LINK_MODULE(wxmediabackend_am) wxFORCE_LINK_MODULE(wxmediabackend_qt) wxFORCE_LINK_MODULE(wxmediabackend_wmp10) -#endif // __WXMSW__ +#endif // static wxMSW build #ifndef __WXMSW__ #include "../sample.xpm" @@ -143,7 +143,7 @@ class wxMediaPlayerApp : public wxApp { public: #ifdef __WXMAC__ - virtual void MacOpenFile(const wxString & fileName ); + virtual void MacOpenFiles(const wxArrayString & fileNames ); #endif virtual bool OnInit(); @@ -404,7 +404,7 @@ const wxChar* wxGetMediaStateText(int nState) // // IMPLEMENT_APP does this, and also implements the platform-specific entry // routine, such as main or WinMain(). Use IMPLEMENT_APP_NO_MAIN if you do -// not desire this behavior. +// not desire this behaviour. // ---------------------------------------------------------------------------- IMPLEMENT_APP(wxMediaPlayerApp) @@ -463,10 +463,10 @@ bool wxMediaPlayerApp::OnInit() #ifdef __WXMAC__ -void wxMediaPlayerApp::MacOpenFile(const wxString & fileName ) +void wxMediaPlayerApp::MacOpenFiles(const wxArrayString & fileNames ) { - // Called when a user drags a file over our app - m_frame->DoOpenFile(fileName, true /* new page */); + // Called when a user drags files over our app + m_frame->DoOpenFile(fileNames[0], true /* new page */); } #endif // __WXMAC__ @@ -1645,7 +1645,7 @@ wxMediaPlayerNotebookPage::wxMediaPlayerNotebookPage(wxMediaPlayerFrame* parentF // m_slider = new wxSlider(this, wxID_SLIDER, 0, // init 0, // start - 0, // end + 1, // end, dummy but must be greater than start wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL ); sizer->Add(m_slider, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND , 5);