]> git.pld-linux.org Git - packages/gpac.git/blob - wxWidgets3.patch
- fix building with wxWidgets 3.0
[packages/gpac.git] / wxWidgets3.patch
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
4 @@ -86,7 +86,7 @@
5  
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());
11  #else
12      SetInitialSize(GetSize());
13 @@ -161,7 +161,7 @@
14          
15          m_eventType = wxEVT_LEFT_UP;
16          
17 -#if (wxMINOR_VERSION<8) 
18 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
19          if (wxRect(wxPoint(0,0), GetSize()).Inside(event.GetPosition()))
20  #else
21          if (wxRect(wxPoint(0,0), GetSize()).Contains(event.GetPosition()))
22 @@ -200,7 +200,7 @@
23          
24          m_eventType = wxEVT_RIGHT_UP;
25  
26 -#if (wxMINOR_VERSION<8) 
27 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
28          if (wxRect(wxPoint(0,0), GetSize()).Inside(event.GetPosition()))
29  #else
30          if (wxRect(wxPoint(0,0), GetSize()).Contains(event.GetPosition()))
31 @@ -319,7 +319,7 @@
32  
33  void wxCustomButton::Paint( wxDC &dc )
34  {
35 -#if (wxMINOR_VERSION<8) 
36 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
37      dc.BeginDrawing();
38  #endif
39  
40 @@ -401,7 +401,7 @@
41      dc.SetBackground(wxNullBrush);
42      dc.SetBrush(wxNullBrush);
43      dc.SetPen(wxNullPen);
44 -#if (wxMINOR_VERSION<8) 
45 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
46      dc.EndDrawing();
47  #endif
48  }
49 @@ -573,7 +573,7 @@
50          {
51              wxPoint p = GetParent()->ScreenToClient(wxGetMousePosition());
52          
53 -#if (wxMINOR_VERSION<8) 
54 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
55              if (GetRect().Inside(p) || labelBut->GetRect().Inside(p))
56  #else
57              if (GetRect().Contains(p) || labelBut->GetRect().Contains(p))
58 @@ -621,7 +621,7 @@
59          {
60              wxPoint p = GetParent()->ScreenToClient(wxGetMousePosition());
61          
62 -#if (wxMINOR_VERSION<8) 
63 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
64              if (GetRect().Inside(p) || dropBut->GetRect().Inside(p))
65  #else
66              if (GetRect().Contains(p) || dropBut->GetRect().Contains(p))
67 @@ -699,7 +699,7 @@
68      SetSize( wxSize(size.x < 0 ? bestSize.x : size.x, 
69                      size.y < 0 ? bestSize.y : size.y) );
70     
71 -#if (wxMINOR_VERSION<8) 
72 +#if (wxMINOR_VERSION<8) && (wxMAJOR_VERSION < 3)
73      SetBestSize(GetSize());
74  #else
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
79 @@ -292,7 +292,7 @@
80  
81  void wxPlaylist::OnAddFile(wxCommandEvent &WXUNUSED(event)) 
82  {
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);
85  
86         if (dlg.ShowModal() == wxID_OK) {
87                 wxArrayString stra;
88 @@ -448,7 +448,7 @@
89         char szPath[GF_MAX_PATH];
90         if (!gf_list_count(m_entries)) return;
91  
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;
95  
96         strcpy(szPath, dlg.GetPath().mb_str(wxConvUTF8));
97 @@ -497,7 +497,7 @@
98  
99  void wxPlaylist::OnOpen(wxCommandEvent & WXUNUSED(event)) 
100  {
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;
104  
105         Clear();
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
109 @@ -224,9 +224,9 @@
110  #if 0
111                 /*log*/
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) );
115                 else
116 -                       ::wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(")"));
117 +                       wxLogMessage(wxString(evt->message.message, wxConvUTF8) + wxT(" (") + wxString(servName, wxConvUTF8) + wxT(")"));
118  #endif
119         }
120                 break;
121 @@ -286,7 +286,7 @@
122                         {
123                                 wxGPACEvent wxevt(app);
124                                 wxevt.gpac_evt = *evt;
125 -                               app->AddPendingEvent(wxevt);
126 +                               app->GetEventHandler()->AddPendingEvent(wxevt);
127                         }
128                                 break;
129                         }
130 @@ -299,7 +299,7 @@
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);
136         }
137                 break;
138         case GF_EVENT_NAVIGATE:
139 @@ -307,7 +307,7 @@
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);
145         }
146                 return 1;
147         case GF_EVENT_SET_CAPTION:
148 @@ -315,7 +315,7 @@
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);
154         }
155                 return 1;
156  
157 @@ -327,7 +327,7 @@
158         {
159                 wxGPACEvent wxevt(app);
160                 wxevt.gpac_evt = *evt;
161 -               app->AddPendingEvent(wxevt);
162 +               app->GetEventHandler()->AddPendingEvent(wxevt);
163         }
164                 break;
165         case GF_EVENT_DBLCLICK:
166 @@ -536,7 +536,7 @@
167      wxString abs_gpac_path = wxT("");
168         char *gpac_cfg, *sep;
169  
170 -       ::wxLogMessage(wxT("Looking for GPAC configuration file"));
171 +       wxLogMessage(wxT("Looking for GPAC configuration file"));
172  
173         /*load config*/
174         Bool first_launch = 0;
175 @@ -565,7 +565,7 @@
176  
177         gf_sys_init(0);
178  
179 -       ::wxLogMessage(wxT("GPAC configuration file opened - looking for modules"));
180 +       wxLogMessage(wxT("GPAC configuration file opened - looking for modules"));
181  
182         m_user.modules = gf_modules_new(str, m_user.config);
183         /*initial launch*/
184 @@ -591,12 +591,12 @@
185  
186  
187  
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) );
193         }
194  
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;
200 @@ -608,7 +608,7 @@
201                 wxMessageDialog(NULL, wxT("Fatal Error"), wxT("Cannot load GPAC Terminal"), wxOK).ShowModal();
202                 return 0;
203         } else {
204 -               ::wxLogMessage(wxT("GPAC Terminal started") );
205 +               wxLogMessage(wxT("GPAC Terminal started") );
206         }
207         return 1;
208  }
209 @@ -874,7 +874,7 @@
210         sOpt = gf_cfg_get_key(m_user.config, "Audio", "DriverName");
211  
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"));
216  
217         } else {
218 @@ -1137,7 +1137,7 @@
219  
220  void wxOsmo4Frame::OnFileOpen(wxCommandEvent & WXUNUSED(event))
221  {
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*/);
224  
225         if (dlg.ShowModal() != wxID_OK) return;
226  
227 @@ -1900,7 +1900,7 @@
228                 evt.SetEventType(wxEVT_COMMAND_COMBOBOX_SELECTED);
229                 evt.SetEventObject(this);
230                 evt.SetId(GetId());
231 -               GetParent()->AddPendingEvent(evt);
232 +               GetParent()->GetEventHandler()->AddPendingEvent(evt);
233         }
234  }
235  
236 @@ -2135,7 +2135,7 @@
237  
238  void wxOsmo4Frame::OnAddSub(wxCommandEvent &WXUNUSED(event))
239  {
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*/);
242  
243         if (dlg.ShowModal() == wxID_OK) {
244                 AddSubtitle(dlg.GetPath().mb_str(wxConvUTF8), 1);
This page took 0.048797 seconds and 4 git commands to generate.