1 diff -ur gpac/applications/osmo4_wx/Playlist.cpp gpac.wx3/applications/osmo4_wx/Playlist.cpp
2 --- gpac/applications/osmo4_wx/Playlist.cpp 2010-07-28 17:53:09.000000000 +0200
3 +++ gpac.wx3/applications/osmo4_wx/Playlist.cpp 2014-01-18 19:00:08.102059900 +0100
6 void wxPlaylist::OnAddFile(wxCommandEvent &WXUNUSED(event))
8 - wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), m_pApp->GetFileFilter(), wxOPEN | wxCHANGE_DIR | /*wxHIDE_READONLY |*/ wxMULTIPLE);
9 + wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), m_pApp->GetFileFilter(), wxFD_OPEN | wxFD_CHANGE_DIR | /*wxFD_HIDE_READONLY |*/ wxFD_MULTIPLE);
11 if (dlg.ShowModal() == wxID_OK) {
14 char szPath[GF_MAX_PATH];
15 if (!gf_list_count(m_entries)) return;
17 - wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), wxT("M3U Playlists|*.m3u|ShoutCast Playlists|*.pls|"), wxSAVE | wxCHANGE_DIR | wxOVERWRITE_PROMPT);
18 + wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), wxT("M3U Playlists|*.m3u|ShoutCast Playlists|*.pls|"), wxFD_SAVE | wxFD_CHANGE_DIR | wxFD_OVERWRITE_PROMPT);
19 if (dlg.ShowModal() != wxID_OK) return;
21 strcpy(szPath, dlg.GetPath().mb_str(wxConvUTF8));
24 void wxPlaylist::OnOpen(wxCommandEvent & WXUNUSED(event))
26 - wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), wxT("M3U & PLS Playlists|*.m3u;*.pls|M3U Playlists|*.m3u|ShoutCast Playlists|*.pls|"), wxOPEN | wxCHANGE_DIR/* | wxHIDE_READONLY*/);
27 + wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), wxT("M3U & PLS Playlists|*.m3u;*.pls|M3U Playlists|*.m3u|ShoutCast Playlists|*.pls|"), wxFD_OPEN | wxFD_CHANGE_DIR/* | wxFD_HIDE_READONLY*/);
28 if (dlg.ShowModal() != wxID_OK) return;
31 diff -ur gpac/applications/osmo4_wx/wxOsmo4.cpp gpac.wx3/applications/osmo4_wx/wxOsmo4.cpp
32 --- gpac/applications/osmo4_wx/wxOsmo4.cpp 2011-07-29 15:14:43.000000000 +0200
33 +++ gpac.wx3/applications/osmo4_wx/wxOsmo4.cpp 2014-01-18 18:59:09.155393660 +0100
37 if (evt->message.error)
38 - ::wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(") ") + wxString(gf_error_to_string(evt->message.error), wxConvUTF8) );
39 + wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(") ") + wxString(gf_error_to_string(evt->message.error), wxConvUTF8) );
41 - ::wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(")"));
42 + wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(")"));
48 wxGPACEvent wxevt(app);
49 wxevt.gpac_evt = *evt;
50 - app->AddPendingEvent(wxevt);
51 + app->GetEventHandler()->AddPendingEvent(wxevt);
56 wxevt.gpac_evt.type = GF_EVENT_CONNECT;
57 wxevt.gpac_evt.connect.is_connected = evt->connect.is_connected;
58 if (!evt->connect.is_connected) app->m_duration = 0;
59 - app->AddPendingEvent(wxevt);
60 + app->GetEventHandler()->AddPendingEvent(wxevt);
63 case GF_EVENT_NAVIGATE:
65 wxGPACEvent wxevt(app);
66 wxevt.to_url = wxString(evt->navigate.to_url, wxConvUTF8);
67 wxevt.gpac_evt.type = evt->type;
68 - app->AddPendingEvent(wxevt);
69 + app->GetEventHandler()->AddPendingEvent(wxevt);
72 case GF_EVENT_SET_CAPTION:
74 wxGPACEvent wxevt(app);
75 wxevt.to_url = wxString(evt->caption.caption, wxConvUTF8);
76 wxevt.gpac_evt.type = evt->type;
77 - app->AddPendingEvent(wxevt);
78 + app->GetEventHandler()->AddPendingEvent(wxevt);
84 wxGPACEvent wxevt(app);
85 wxevt.gpac_evt = *evt;
86 - app->AddPendingEvent(wxevt);
87 + app->GetEventHandler()->AddPendingEvent(wxevt);
90 case GF_EVENT_DBLCLICK:
92 wxString abs_gpac_path = wxT("");
95 - ::wxLogMessage(wxT("Looking for GPAC configuration file"));
96 + wxLogMessage(wxT("Looking for GPAC configuration file"));
99 Bool first_launch = 0;
104 - ::wxLogMessage(wxT("GPAC configuration file opened - looking for modules"));
105 + wxLogMessage(wxT("GPAC configuration file opened - looking for modules"));
107 m_user.modules = gf_modules_new(str, m_user.config);
109 @@ -591,12 +591,12 @@
113 - ::wxLogMessage(wxT("%d modules found:"), gf_modules_get_count(m_user.modules));
114 + wxLogMessage(wxT("%d modules found:"), gf_modules_get_count(m_user.modules));
115 for (u32 i=0; i<gf_modules_get_count(m_user.modules); i++) {
116 - ::wxLogMessage(wxT("\t") + wxString(gf_modules_get_file_name(m_user.modules, i), wxConvUTF8) );
117 + wxLogMessage(wxT("\t") + wxString(gf_modules_get_file_name(m_user.modules, i), wxConvUTF8) );
120 - ::wxLogMessage(wxT("Starting GPAC Terminal"));
121 + wxLogMessage(wxT("Starting GPAC Terminal"));
122 /*now load terminal*/
123 m_user.opaque = this;
124 m_user.EventProc = GPAC_EventProc;
126 wxMessageDialog(NULL, wxT("Fatal Error"), wxT("Cannot load GPAC Terminal"), wxOK).ShowModal();
129 - ::wxLogMessage(wxT("GPAC Terminal started") );
130 + wxLogMessage(wxT("GPAC Terminal started") );
134 @@ -877,7 +877,7 @@ wxOsmo4Frame::wxOsmo4Frame() :
135 sOpt = gf_cfg_get_key(m_user.config, "Audio", "DriverName");
137 if (!strcmp(sOpt, "No Audio Output Available")) {
138 - ::wxLogMessage(wxT("WARNING: no audio output availble - make sure no other program is locking the sound card"));
139 + wxLogMessage(wxT("WARNING: no audio output availble - make sure no other program is locking the sound card"));
140 SetStatus(wxT("No audio ouput available"));
143 @@ -1137,7 +1137,7 @@
145 void wxOsmo4Frame::OnFileOpen(wxCommandEvent & WXUNUSED(event))
147 - wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), GetFileFilter(), wxOPEN | wxMULTIPLE | wxCHANGE_DIR /*| wxHIDE_READONLY*/);
148 + wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), GetFileFilter(), wxFD_OPEN | wxFD_MULTIPLE | wxFD_CHANGE_DIR /*| wxHIDE_READONLY*/);
150 if (dlg.ShowModal() != wxID_OK) return;
152 @@ -1900,7 +1900,7 @@
153 evt.SetEventType(wxEVT_COMMAND_COMBOBOX_SELECTED);
154 evt.SetEventObject(this);
156 - GetParent()->AddPendingEvent(evt);
157 + GetParent()->GetEventHandler()->AddPendingEvent(evt);
161 @@ -2135,7 +2135,7 @@
163 void wxOsmo4Frame::OnAddSub(wxCommandEvent &WXUNUSED(event))
165 - wxFileDialog dlg(this, wxT("Add Subtitle"), wxT(""), wxT(""), wxT("All Subtitles|*.srt;*.ttxt|SRT Subtitles|*.srt|3GPP TimedText|*.ttxt|"), wxOPEN | wxCHANGE_DIR /* | wxHIDE_READONLY*/);
166 + wxFileDialog dlg(this, wxT("Add Subtitle"), wxT(""), wxT(""), wxT("All Subtitles|*.srt;*.ttxt|SRT Subtitles|*.srt|3GPP TimedText|*.ttxt|"), wxFD_OPEN | wxFD_CHANGE_DIR /* | wxHIDE_READONLY*/);
168 if (dlg.ShowModal() == wxID_OK) {
169 AddSubtitle(dlg.GetPath().mb_str(wxConvUTF8), 1);
170 --- gpac/applications/osmo4_wx/wxGPACControl.cpp~ 2014-10-07 23:09:59.000000000 +0200
171 +++ gpac/applications/osmo4_wx/wxGPACControl.cpp 2014-10-07 23:36:33.313608359 +0200
175 sOpt = gf_cfg_get_key(cfg, "Systems", "DefAudioDec");
176 - u32 count = gf_modules_get_count(m_pApp->m_user.modules);
177 + count = gf_modules_get_count(m_pApp->m_user.modules);
178 GF_BaseDecoder *ifc_d;
182 --- gpac/applications/osmo4_wx/menubtn.cpp~ 2014-10-07 23:09:59.000000000 +0200
183 +++ gpac/applications/osmo4_wx/menubtn.cpp 2014-10-07 23:42:37.356710868 +0200
184 @@ -86,7 +86,7 @@ bool wxCustomButton::Create(wxWindow* pa
186 wxSize bestSize = DoGetBestSize();
187 SetSize(wxSize(size.x<0 ? bestSize.x:size.x, size.y<0 ? bestSize.y:size.y));
188 -#if (wxMINOR_VERSION<8)
189 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
190 SetBestSize(GetSize());
192 SetInitialSize(GetSize());
193 @@ -161,7 +161,7 @@ void wxCustomButton::OnMouseEvents(wxMou
195 m_eventType = wxEVT_LEFT_UP;
197 -#if (wxMINOR_VERSION<8)
198 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
199 if (wxRect(wxPoint(0,0), GetSize()).Inside(event.GetPosition()))
201 if (wxRect(wxPoint(0,0), GetSize()).Contains(event.GetPosition()))
202 @@ -200,7 +200,7 @@ void wxCustomButton::OnMouseEvents(wxMou
204 m_eventType = wxEVT_RIGHT_UP;
206 -#if (wxMINOR_VERSION<8)
207 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
208 if (wxRect(wxPoint(0,0), GetSize()).Inside(event.GetPosition()))
210 if (wxRect(wxPoint(0,0), GetSize()).Contains(event.GetPosition()))
211 @@ -319,7 +319,7 @@ void wxCustomButton::Redraw()
213 void wxCustomButton::Paint( wxDC &dc )
215 -#if (wxMINOR_VERSION<8)
216 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
220 @@ -407,7 +407,7 @@ void wxCustomButton::Paint( wxDC &dc )
221 dc.SetBackground(wxNullBrush);
222 dc.SetBrush(wxNullBrush);
223 dc.SetPen(wxNullPen);
224 -#if (wxMINOR_VERSION<8)
225 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
229 @@ -580,7 +580,7 @@ public:
231 wxPoint p = GetParent()->ScreenToClient(wxGetMousePosition());
233 -#if (wxMINOR_VERSION<8)
234 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
235 if (GetRect().Inside(p) || labelBut->GetRect().Inside(p))
237 if (GetRect().Contains(p) || labelBut->GetRect().Contains(p))
238 @@ -628,7 +628,7 @@ public:
240 wxPoint p = GetParent()->ScreenToClient(wxGetMousePosition());
242 -#if (wxMINOR_VERSION<8)
243 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
244 if (GetRect().Inside(p) || dropBut->GetRect().Inside(p))
246 if (GetRect().Contains(p) || dropBut->GetRect().Contains(p))
247 @@ -706,7 +706,7 @@ bool wxMenuButton::Create( wxWindow* par
248 SetSize( wxSize(size.x < 0 ? bestSize.x : size.x,
249 size.y < 0 ? bestSize.y : size.y) );
251 -#if (wxMINOR_VERSION<8)
252 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
253 SetBestSize(GetSize());
255 SetInitialSize(GetSize());