No need to differentiate between GNOME and Ubuntu GNOME

This commit is contained in:
Craig Drummond
2018-05-21 17:28:10 +01:00
committed by Craig Drummond
parent 95e26292c3
commit bddf1b86a2
3 changed files with 4 additions and 5 deletions

View File

@@ -595,7 +595,7 @@ void MainWindow::init()
#ifdef Q_OS_MAC
bool showMenubar = true;
#else
bool showMenubar = Utils::Gnome!=Utils::currentDe() && Utils::Ubuntu_Gnome!=Utils::currentDe();
bool showMenubar = Utils::Gnome!=Utils::currentDe();
#endif
if (showMenubar) {
#ifdef Q_OS_MAC

View File

@@ -907,7 +907,7 @@ Utils::Desktop Utils::currentDe()
} else if (desktop.contains("kde")) {
de=KDE;
} else if (desktop.contains("gnome") || desktop.contains("pantheon")) {
de=desktop.contains("ubuntu") ? Ubuntu_Gnome : Gnome;
de=Gnome;
} else {
QByteArray kde=qgetenv("KDE_FULL_SESSION");
if ("true"==kde) {
@@ -927,9 +927,9 @@ bool Utils::useSystemTray()
#elif defined Q_OS_WIN
return true;
#elif QT_QTDBUS_FOUND
return Ubuntu_Gnome==currentDe() || Gnome==currentDe() ? QDBusConnection::sessionBus().interface()->isServiceRegistered("org.kde.StatusNotifierWatcher") : true;
return Gnome==currentDe() ? QDBusConnection::sessionBus().interface()->isServiceRegistered("org.kde.StatusNotifierWatcher") : true;
#else
return Ubuntu_Gnome!=currentDe() && Gnome!=currentDe();
return Gnome!=currentDe();
#endif
}

View File

@@ -114,7 +114,6 @@ namespace Utils
enum Desktop {
KDE,
Gnome,
Ubuntu_Gnome,
Unity,
Other
};