From 38f27a76a1b5ddaabc9fc80a258f484b828d70a9 Mon Sep 17 00:00:00 2001 From: "lllucius@gmail.com" Date: Sat, 3 Jan 2015 17:10:53 +0000 Subject: [PATCH] Fix building on Linux with wx3 and gtk3 --- src/effects/VST/VSTEffect.cpp | 33 ++++++--------------------------- src/effects/VST/VSTEffect.h | 1 - 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/src/effects/VST/VSTEffect.cpp b/src/effects/VST/VSTEffect.cpp index 1435c0b7e..fc63a6372 100644 --- a/src/effects/VST/VSTEffect.cpp +++ b/src/effects/VST/VSTEffect.cpp @@ -174,7 +174,7 @@ IMPLEMENT_DYNAMIC_CLASS(VSTSubEntry, wxModule); // VSTSubProcess //---------------------------------------------------------------------------- #define OUTPUTKEY wxT("-") -enum +enum InfoKeys { kKeySubIDs, kKeyBegin, @@ -619,7 +619,8 @@ bool VSTEffectsModule::RegisterPlugin(PluginManagerInterface & pm, const wxStrin bool skip = false; if (progress) { - cont = progress->Update(idNdx++, + idNdx++; + cont = progress->Update(idNdx, wxString::Format(_("Registering %d of %d: %-64.64s"), idNdx, idCnt, proc->GetName().c_str())); } @@ -730,28 +731,6 @@ void VSTEffectsModule::Check(const wxChar *path) } } -void VSTEffectsModule::WriteInfo(VSTEffect *effect) -{ - // We want to output info in one chunk to prevent output - // from the effect intermixing with the info - wxString out; - out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyBegin, wxEmptyString); - out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyID, effect->GetID().c_str()); - out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyPath, effect->GetPath().c_str()); - out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyName, effect->GetName().c_str()); - out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyVendor, effect->GetVendor().c_str()); - out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyVersion, effect->GetVersion().c_str()); - out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyDescription, effect->GetDescription().c_str()); - out += wxString::Format(wxT("%s%d=%d\n"), OUTPUTKEY, kKeyEffectType, effect->GetType()); - out += wxString::Format(wxT("%s%d=%d\n"), OUTPUTKEY, kKeyInteractive, effect->IsInteractive()); - out += wxString::Format(wxT("%s%d=%d\n"), OUTPUTKEY, kKeyAutomatable, effect->SupportsAutomation()); - out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyEnd, wxEmptyString); - - const wxCharBuffer buf = out.ToUTF8(); - fwrite(buf, 1, strlen(buf), stdout); - fflush(stdout); -} - /////////////////////////////////////////////////////////////////////////////// // // VSTEffectOptionsDialog @@ -3476,14 +3455,14 @@ void VSTEffect::BuildFancy() wxPanel *w = new wxPanel(mParent, wxID_ANY); // Make sure the parent has a window - if (!GTK_WIDGET(w->m_wxwindow)->window) + if (!gtk_widget_get_realized(GTK_WIDGET(w->m_wxwindow))) { gtk_widget_realize(GTK_WIDGET(w->m_wxwindow)); } - GdkWindow *gwin = GTK_WIDGET(w->m_wxwindow)->window; + GdkWindow *gwin = gtk_widget_get_window(GTK_WIDGET(w->m_wxwindow)); mXdisp = GDK_WINDOW_XDISPLAY(gwin); - mXwin = GDK_WINDOW_XWINDOW(gwin); + mXwin = GDK_WINDOW_XID(gwin); callDispatcher(effEditOpen, 0, (intptr_t)mXdisp, (void *)mXwin, 0.0); diff --git a/src/effects/VST/VSTEffect.h b/src/effects/VST/VSTEffect.h index edfbcacc9..08c200662 100644 --- a/src/effects/VST/VSTEffect.h +++ b/src/effects/VST/VSTEffect.h @@ -428,7 +428,6 @@ public: // VSTEffectModule implementation static void Check(const wxChar *path); - static void WriteInfo(VSTEffect *effect); private: ModuleManagerInterface *mModMan;