1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Use GTK status icon on Gnome

Instead of Unity, which has less features and is a hack
This commit is contained in:
tux3 2015-02-25 11:30:15 +01:00
parent a035a6cfd6
commit 5c92c3b89d
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -12,7 +12,7 @@ SystemTrayIcon::SystemTrayIcon()
desktop = desktop.toLower(); desktop = desktop.toLower();
if (false); if (false);
#ifdef ENABLE_SYSTRAY_UNITY_BACKEND #ifdef ENABLE_SYSTRAY_UNITY_BACKEND
else if (desktop == "unity" || desktop.contains("gnome")) else if (desktop == "unity")
{ {
qDebug() << "SystemTrayIcon: Using Unity backend"; qDebug() << "SystemTrayIcon: Using Unity backend";
gtk_init(nullptr, nullptr); gtk_init(nullptr, nullptr);
@ -38,7 +38,7 @@ SystemTrayIcon::SystemTrayIcon()
} }
#endif #endif
#ifdef ENABLE_SYSTRAY_GTK_BACKEND #ifdef ENABLE_SYSTRAY_GTK_BACKEND
else if (desktop == "xfce" || (desktop == "kde" else if (desktop == "xfce" || desktop.contains("gnome") || (desktop == "kde"
&& getenv("KDE_SESSION_VERSION") == QString("4"))) && getenv("KDE_SESSION_VERSION") == QString("4")))
{ {
qDebug() << "SystemTrayIcon: Using GTK backend"; qDebug() << "SystemTrayIcon: Using GTK backend";