mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-07 18:15:15 +00:00
linux-desktop-environment: detect Ubuntu properly enabling features
In Ubuntu (running in GNOME) we support AppIndicator and Unity counters still.
This commit is contained in:
committed by
John Preston
parent
9dc3847dbe
commit
0de9c62675
@@ -38,6 +38,9 @@ Type Compute() {
|
||||
} else if (list.contains("pantheon")) {
|
||||
return Type::Pantheon;
|
||||
} else if (list.contains("gnome")) {
|
||||
if (list.contains("ubuntu"))
|
||||
return Type::Ubuntu;
|
||||
|
||||
return Type::Gnome;
|
||||
} else if (list.contains("kde")) {
|
||||
if (kdeSession == qstr("5")) {
|
||||
@@ -88,6 +91,7 @@ Type ComputeAndLog() {
|
||||
case Type::KDE3: return "KDE3";
|
||||
case Type::KDE4: return "KDE4";
|
||||
case Type::KDE5: return "KDE5";
|
||||
case Type::Ubuntu: return "Ubuntu";
|
||||
case Type::Unity: return "Unity";
|
||||
case Type::XFCE: return "XFCE";
|
||||
case Type::Pantheon: return "Pantheon";
|
||||
@@ -112,12 +116,12 @@ bool TryQtTrayIcon() {
|
||||
}
|
||||
|
||||
bool PreferAppIndicatorTrayIcon() {
|
||||
return IsXFCE() || IsUnity() ||
|
||||
return IsXFCE() || IsUnity() || IsUbuntu() ||
|
||||
(IsGnome() && QDBusInterface("org.kde.StatusNotifierWatcher", "/").isValid());
|
||||
}
|
||||
|
||||
bool TryUnityCounter() {
|
||||
return IsUnity() || IsPantheon();
|
||||
return IsUnity() || IsPantheon() || IsUbuntu();
|
||||
}
|
||||
|
||||
} // namespace DesktopEnvironment
|
||||
|
Reference in New Issue
Block a user