From 073bdbedcc1e35ef5a5658f83adc055b3b9ae05d Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 25 Oct 2012 09:54:59 -0700 Subject: [PATCH] Disable Ubuntu's global menu bar for Aegisub wxWidgets currently doesn't generate menu open or update events for the Ubuntu menubar (since GTK doesn't send the relevant signals to the application), which we rely on. Updates #1531. --- aegisub/src/main.cpp | 5 +++++ aegisub/src/main.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/aegisub/src/main.cpp b/aegisub/src/main.cpp index 5ac03bb9a..baf7b3ffb 100644 --- a/aegisub/src/main.cpp +++ b/aegisub/src/main.cpp @@ -132,6 +132,11 @@ void AegisubApp::OnAssertFailure(const wxChar *file, int line, const wxChar *fun wxApp::OnAssertFailure(file, line, func, cond, msg); } +AegisubApp::AegisubApp() { + // http://trac.wxwidgets.org/ticket/14302 + wxSetEnv("UBUNTU_MENUPROXY", "0"); +} + /// @brief Gets called when application starts. /// @return bool bool AegisubApp::OnInit() { diff --git a/aegisub/src/main.h b/aegisub/src/main.h index c926eed41..5e3351dce 100644 --- a/aegisub/src/main.h +++ b/aegisub/src/main.h @@ -34,7 +34,6 @@ /// @ingroup main /// - #ifndef AGI_PRE #include #include @@ -113,6 +112,8 @@ class AegisubApp: public wxApp { void HandleEvent(wxEvtHandler *handler, wxEventFunction func, wxEvent& event) const; public: + AegisubApp(); + /// DOCME AegisubLocale locale;