Merge pull request #708 from matttbe/globalmenu

linux: GlobalMenu: UBUNTU_MENUPROXY with >1 char
This commit is contained in:
Cheng Zhao 2014-10-16 18:53:24 +08:00
commit feb6a93881

View file

@ -68,11 +68,10 @@ bool ShouldUseGlobalMenuBar() {
// Some DE would pretend to be Unity but don't have global application menu,
// so we can not trust unity::IsRunning().
// When Unity's GlobalMenu is running $UBUNTU_MENUPROXY should be set to
// something like "libappmenu.so".
// something like "libappmenu.so" (not 0 or 1)
scoped_ptr<base::Environment> env(base::Environment::Create());
std::string name;
return env && env->GetVar("UBUNTU_MENUPROXY", &name) &&
!name.empty() && name != "0";
return env && env->GetVar("UBUNTU_MENUPROXY", &name) && name.length() > 1;
}
#endif