From a97a91a7be4e5e96c9cbc6dbfb23aa624b4d3843 Mon Sep 17 00:00:00 2001 From: agilob Date: Sat, 29 Aug 2015 18:25:28 +0100 Subject: [PATCH] core review changes - formatting --- src/widget/widget.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 77d508a24..1ffb80af6 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -1924,13 +1924,20 @@ QString Widget::getStatusIconPath(Status status) inline QIcon Widget::getStatusIcon(Status status, uint32_t, uint32_t) { -#ifdef __linux__ + +#ifdef Q_OS_LINUX + QString desktop = getenv("XDG_CURRENT_DESKTOP"); if (desktop.isEmpty()) + { desktop = getenv("DESKTOP_SESSION"); + } desktop = desktop.toLower(); - if (desktop == "xfce" || desktop.contains("gnome") || desktop == "mate") { - if (w > 0 && h > 0) { + + if (desktop == "xfce" || desktop.contains("gnome") || desktop == "mate") + { + if (w > 0 && h > 0) + { return getStatusIconPixmap(status, w, h); } }