1 diff -ur gpac/applications/osmo4_wx/menubtn.cpp gpac.wx3/applications/osmo4_wx/menubtn.cpp
2 --- gpac/applications/osmo4_wx/menubtn.cpp 2010-07-28 17:53:09.000000000 +0200
3 +++ gpac.wx3/applications/osmo4_wx/menubtn.cpp 2014-01-18 19:05:19.802057643 +0100
6 wxSize bestSize = DoGetBestSize();
7 SetSize(wxSize(size.x<0 ? bestSize.x:size.x, size.y<0 ? bestSize.y:size.y));
8 -#if (wxMINOR_VERSION<8)
9 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
10 SetBestSize(GetSize());
12 SetInitialSize(GetSize());
15 m_eventType = wxEVT_LEFT_UP;
17 -#if (wxMINOR_VERSION<8)
18 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
19 if (wxRect(wxPoint(0,0), GetSize()).Inside(event.GetPosition()))
21 if (wxRect(wxPoint(0,0), GetSize()).Contains(event.GetPosition()))
24 m_eventType = wxEVT_RIGHT_UP;
26 -#if (wxMINOR_VERSION<8)
27 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
28 if (wxRect(wxPoint(0,0), GetSize()).Inside(event.GetPosition()))
30 if (wxRect(wxPoint(0,0), GetSize()).Contains(event.GetPosition()))
33 void wxCustomButton::Paint( wxDC &dc )
35 -#if (wxMINOR_VERSION<8)
36 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
41 dc.SetBackground(wxNullBrush);
42 dc.SetBrush(wxNullBrush);
44 -#if (wxMINOR_VERSION<8)
45 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
51 wxPoint p = GetParent()->ScreenToClient(wxGetMousePosition());
53 -#if (wxMINOR_VERSION<8)
54 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
55 if (GetRect().Inside(p) || labelBut->GetRect().Inside(p))
57 if (GetRect().Contains(p) || labelBut->GetRect().Contains(p))
60 wxPoint p = GetParent()->ScreenToClient(wxGetMousePosition());
62 -#if (wxMINOR_VERSION<8)
63 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
64 if (GetRect().Inside(p) || dropBut->GetRect().Inside(p))
66 if (GetRect().Contains(p) || dropBut->GetRect().Contains(p))
68 SetSize( wxSize(size.x < 0 ? bestSize.x : size.x,
69 size.y < 0 ? bestSize.y : size.y) );
71 -#if (wxMINOR_VERSION<8)
72 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
73 SetBestSize(GetSize());
75 SetInitialSize(GetSize());
76 diff -ur gpac/applications/osmo4_wx/Playlist.cpp gpac.wx3/applications/osmo4_wx/Playlist.cpp
77 --- gpac/applications/osmo4_wx/Playlist.cpp 2010-07-28 17:53:09.000000000 +0200
78 +++ gpac.wx3/applications/osmo4_wx/Playlist.cpp 2014-01-18 19:00:08.102059900 +0100
81 void wxPlaylist::OnAddFile(wxCommandEvent &WXUNUSED(event))
83 - wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), m_pApp->GetFileFilter(), wxOPEN | wxCHANGE_DIR | /*wxHIDE_READONLY |*/ wxMULTIPLE);
84 + wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), m_pApp->GetFileFilter(), wxFD_OPEN | wxFD_CHANGE_DIR | /*wxFD_HIDE_READONLY |*/ wxFD_MULTIPLE);
86 if (dlg.ShowModal() == wxID_OK) {
89 char szPath[GF_MAX_PATH];
90 if (!gf_list_count(m_entries)) return;
92 - wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), wxT("M3U Playlists|*.m3u|ShoutCast Playlists|*.pls|"), wxSAVE | wxCHANGE_DIR | wxOVERWRITE_PROMPT);
93 + wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), wxT("M3U Playlists|*.m3u|ShoutCast Playlists|*.pls|"), wxFD_SAVE | wxFD_CHANGE_DIR | wxFD_OVERWRITE_PROMPT);
94 if (dlg.ShowModal() != wxID_OK) return;
96 strcpy(szPath, dlg.GetPath().mb_str(wxConvUTF8));
99 void wxPlaylist::OnOpen(wxCommandEvent & WXUNUSED(event))
101 - 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*/);
102 + 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*/);
103 if (dlg.ShowModal() != wxID_OK) return;
106 diff -ur gpac/applications/osmo4_wx/wxOsmo4.cpp gpac.wx3/applications/osmo4_wx/wxOsmo4.cpp
107 --- gpac/applications/osmo4_wx/wxOsmo4.cpp 2011-07-29 15:14:43.000000000 +0200
108 +++ gpac.wx3/applications/osmo4_wx/wxOsmo4.cpp 2014-01-18 18:59:09.155393660 +0100
112 if (evt->message.error)
113 - ::wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(") ") + wxString(gf_error_to_string(evt->message.error), wxConvUTF8) );
114 + wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(") ") + wxString(gf_error_to_string(evt->message.error), wxConvUTF8) );
116 - ::wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(")"));
117 + wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(")"));
123 wxGPACEvent wxevt(app);
124 wxevt.gpac_evt = *evt;
125 - app->AddPendingEvent(wxevt);
126 + app->GetEventHandler()->AddPendingEvent(wxevt);
131 wxevt.gpac_evt.type = GF_EVENT_CONNECT;
132 wxevt.gpac_evt.connect.is_connected = evt->connect.is_connected;
133 if (!evt->connect.is_connected) app->m_duration = 0;
134 - app->AddPendingEvent(wxevt);
135 + app->GetEventHandler()->AddPendingEvent(wxevt);
138 case GF_EVENT_NAVIGATE:
140 wxGPACEvent wxevt(app);
141 wxevt.to_url = wxString(evt->navigate.to_url, wxConvUTF8);
142 wxevt.gpac_evt.type = evt->type;
143 - app->AddPendingEvent(wxevt);
144 + app->GetEventHandler()->AddPendingEvent(wxevt);
147 case GF_EVENT_SET_CAPTION:
149 wxGPACEvent wxevt(app);
150 wxevt.to_url = wxString(evt->caption.caption, wxConvUTF8);
151 wxevt.gpac_evt.type = evt->type;
152 - app->AddPendingEvent(wxevt);
153 + app->GetEventHandler()->AddPendingEvent(wxevt);
159 wxGPACEvent wxevt(app);
160 wxevt.gpac_evt = *evt;
161 - app->AddPendingEvent(wxevt);
162 + app->GetEventHandler()->AddPendingEvent(wxevt);
165 case GF_EVENT_DBLCLICK:
167 wxString abs_gpac_path = wxT("");
168 char *gpac_cfg, *sep;
170 - ::wxLogMessage(wxT("Looking for GPAC configuration file"));
171 + wxLogMessage(wxT("Looking for GPAC configuration file"));
174 Bool first_launch = 0;
179 - ::wxLogMessage(wxT("GPAC configuration file opened - looking for modules"));
180 + wxLogMessage(wxT("GPAC configuration file opened - looking for modules"));
182 m_user.modules = gf_modules_new(str, m_user.config);
184 @@ -591,12 +591,12 @@
188 - ::wxLogMessage(wxT("%d modules found:"), gf_modules_get_count(m_user.modules));
189 + wxLogMessage(wxT("%d modules found:"), gf_modules_get_count(m_user.modules));
190 for (u32 i=0; i<gf_modules_get_count(m_user.modules); i++) {
191 - ::wxLogMessage(wxT("\t") + wxString(gf_modules_get_file_name(m_user.modules, i), wxConvUTF8) );
192 + wxLogMessage(wxT("\t") + wxString(gf_modules_get_file_name(m_user.modules, i), wxConvUTF8) );
195 - ::wxLogMessage(wxT("Starting GPAC Terminal"));
196 + wxLogMessage(wxT("Starting GPAC Terminal"));
197 /*now load terminal*/
198 m_user.opaque = this;
199 m_user.EventProc = GPAC_EventProc;
201 wxMessageDialog(NULL, wxT("Fatal Error"), wxT("Cannot load GPAC Terminal"), wxOK).ShowModal();
204 - ::wxLogMessage(wxT("GPAC Terminal started") );
205 + wxLogMessage(wxT("GPAC Terminal started") );
210 sOpt = gf_cfg_get_key(m_user.config, "Audio", "DriverName");
212 if (!strcmp(sOpt, "No Audio Output Available")) {
213 - ::wxLogMessage(wxT("WARNING: no audio output availble - make sure no other program is locking the sound card"));
214 + wxLogMessage(wxT("WARNING: no audio output availble - make sure no other program is locking the sound card"));
215 SetStatus(wxT("No audio ouput available"));
218 @@ -1137,7 +1137,7 @@
220 void wxOsmo4Frame::OnFileOpen(wxCommandEvent & WXUNUSED(event))
222 - wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), GetFileFilter(), wxOPEN | wxMULTIPLE | wxCHANGE_DIR /*| wxHIDE_READONLY*/);
223 + wxFileDialog dlg(this, wxT("Select file(s)"), wxT(""), wxT(""), GetFileFilter(), wxFD_OPEN | wxFD_MULTIPLE | wxFD_CHANGE_DIR /*| wxHIDE_READONLY*/);
225 if (dlg.ShowModal() != wxID_OK) return;
227 @@ -1900,7 +1900,7 @@
228 evt.SetEventType(wxEVT_COMMAND_COMBOBOX_SELECTED);
229 evt.SetEventObject(this);
231 - GetParent()->AddPendingEvent(evt);
232 + GetParent()->GetEventHandler()->AddPendingEvent(evt);
236 @@ -2135,7 +2135,7 @@
238 void wxOsmo4Frame::OnAddSub(wxCommandEvent &WXUNUSED(event))
240 - wxFileDialog dlg(this, wxT("Add Subtitle"), wxT(""), wxT(""), wxT("All Subtitles|*.srt;*.ttxt|SRT Subtitles|*.srt|3GPP TimedText|*.ttxt|"), wxOPEN | wxCHANGE_DIR /* | wxHIDE_READONLY*/);
241 + 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*/);
243 if (dlg.ShowModal() == wxID_OK) {
244 AddSubtitle(dlg.GetPath().mb_str(wxConvUTF8), 1);