Handle UBUNTU_MENUPROXY=0 as "not using global menu".

Although the correct way to disable the global menu bar under Ubuntu is to
set UBUNTU_MENUPROXY to an empty string, many guides on the web advise setting
it to "0", so handle this special case in wxApp::GTKIsUsingGlobalMenu() too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2012-11-25 11:51:21 +00:00
parent 1897abe1d8
commit f8115cdc62

View File

@ -542,7 +542,7 @@ bool wxApp::GTKIsUsingGlobalMenu()
// XDG_CURRENT_DESKTOP env var being set to "Unity".
wxString proxy;
s_isUsingGlobalMenu = wxGetEnv("UBUNTU_MENUPROXY", &proxy) &&
!proxy.empty();
!proxy.empty() && proxy != "0";
}
return s_isUsingGlobalMenu == 1;