From bddf1b86a2434a76a4569d1eaaf4fa1cd494cd7b Mon Sep 17 00:00:00 2001 From: Craig Drummond Date: Mon, 21 May 2018 17:28:10 +0100 Subject: [PATCH] No need to differentiate between GNOME and Ubuntu GNOME --- gui/mainwindow.cpp | 2 +- support/utils.cpp | 6 +++--- support/utils.h | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index db0a8c368..9507d436d 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -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 diff --git a/support/utils.cpp b/support/utils.cpp index a3497d252..1e9f41a2c 100644 --- a/support/utils.cpp +++ b/support/utils.cpp @@ -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 } diff --git a/support/utils.h b/support/utils.h index 354af2a13..b66a7c355 100644 --- a/support/utils.h +++ b/support/utils.h @@ -114,7 +114,6 @@ namespace Utils enum Desktop { KDE, Gnome, - Ubuntu_Gnome, Unity, Other };