зеркало из https://github.com/electron/electron.git
Merge pull request #708 from matttbe/globalmenu
linux: GlobalMenu: UBUNTU_MENUPROXY with >1 char
This commit is contained in:
Коммит
feb6a93881
|
@ -68,11 +68,10 @@ bool ShouldUseGlobalMenuBar() {
|
||||||
// Some DE would pretend to be Unity but don't have global application menu,
|
// Some DE would pretend to be Unity but don't have global application menu,
|
||||||
// so we can not trust unity::IsRunning().
|
// so we can not trust unity::IsRunning().
|
||||||
// When Unity's GlobalMenu is running $UBUNTU_MENUPROXY should be set to
|
// 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());
|
scoped_ptr<base::Environment> env(base::Environment::Create());
|
||||||
std::string name;
|
std::string name;
|
||||||
return env && env->GetVar("UBUNTU_MENUPROXY", &name) &&
|
return env && env->GetVar("UBUNTU_MENUPROXY", &name) && name.length() > 1;
|
||||||
!name.empty() && name != "0";
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче