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

Fix system tray icon on GNOME classic

There doesn't seem to be a system tray icon at all in GNOME shell ?
This commit is contained in:
tux3 2015-02-23 20:06:16 +01:00
parent fdb86ca7e9
commit 925e32f23a
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -9,11 +9,13 @@
SystemTrayIcon::SystemTrayIcon()
{
QString desktop = getenv("XDG_CURRENT_DESKTOP");
desktop = desktop.toLower();
if (false);
#ifdef ENABLE_SYSTRAY_UNITY_BACKEND
else if (desktop.toLower() == "unity")
else if (desktop == "unity" || desktop.contains("gnome"))
{
qDebug() << "SystemTrayIcon: Using Unity backend";
gtk_init(nullptr, nullptr);
QString settingsDir = Settings::getSettingsDirPath();
QFile iconFile(settingsDir+"/icon.png");
if (iconFile.open(QIODevice::Truncate | QIODevice::WriteOnly))