1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-21 15:08:01 +02:00

Make the IPC classes wx3 compatible

This commit is contained in:
lllucius 2015-01-04 21:18:37 +00:00
parent 4e8b794452
commit 9ead6d4221

View File

@ -586,10 +586,8 @@ public:
{ {
}; };
bool OnExecute(const wxString & WXUNUSED(topic), bool OnExec(const wxString & WXUNUSED(topic),
wxChar *data, const wxString & data)
int WXUNUSED(size),
wxIPCFormat WXUNUSED(format))
{ {
if (!gInited) { if (!gInited) {
return false; return false;
@ -597,13 +595,11 @@ public:
AudacityProject *project = CreateNewAudacityProject(); AudacityProject *project = CreateNewAudacityProject();
wxString cmd(data);
// We queue a command event to the project responsible for // We queue a command event to the project responsible for
// opening the file since it can be a long process and we // opening the file since it can be a long process and we
// only have 5 seconds to return the Execute message to the // only have 5 seconds to return the Execute message to the
// client. // client.
if (!cmd.IsEmpty()) { if (!data.IsEmpty()) {
wxCommandEvent e(EVT_OPEN_AUDIO_FILE); wxCommandEvent e(EVT_OPEN_AUDIO_FILE);
e.SetString(data); e.SetString(data);
project->GetEventHandler()->AddPendingEvent(e); project->GetEventHandler()->AddPendingEvent(e);
@ -614,6 +610,16 @@ public:
return true; return true;
} }
#if !wxCHECK_VERSION(3, 0, 0)
bool OnExecute(const wxString & topic,
wxChar *data,
int WXUNUSED(size),
wxIPCFormat WXUNUSED(format))
{
return OnExec(topic, data);
}
#endif
virtual bool OnDisconnect() virtual bool OnDisconnect()
{ {
return true; return true;