From 78b70e987e229a2bce35afe500a05dc4b90bd2f6 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 | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/aegisub/src/main.cpp b/aegisub/src/main.cpp index b6607886e..43b42503a 100644 --- a/aegisub/src/main.cpp +++ b/aegisub/src/main.cpp @@ -131,6 +131,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 1709ec3e7..df804826b 100644 --- a/aegisub/src/main.h +++ b/aegisub/src/main.h @@ -34,7 +34,6 @@ /// @ingroup main /// - #ifndef AGI_PRE #include #include @@ -93,6 +92,7 @@ class AegisubApp: public wxApp { void HandleEvent(wxEvtHandler *handler, wxEventFunction func, wxEvent& event) const; public: + AegisubApp(); AegisubLocale locale; FrameMain *frame; Automation4::AutoloadScriptManager *global_scripts;