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:
parent
fdb86ca7e9
commit
925e32f23a
|
@ -9,11 +9,13 @@
|
||||||
SystemTrayIcon::SystemTrayIcon()
|
SystemTrayIcon::SystemTrayIcon()
|
||||||
{
|
{
|
||||||
QString desktop = getenv("XDG_CURRENT_DESKTOP");
|
QString desktop = getenv("XDG_CURRENT_DESKTOP");
|
||||||
|
desktop = desktop.toLower();
|
||||||
if (false);
|
if (false);
|
||||||
#ifdef ENABLE_SYSTRAY_UNITY_BACKEND
|
#ifdef ENABLE_SYSTRAY_UNITY_BACKEND
|
||||||
else if (desktop.toLower() == "unity")
|
else if (desktop == "unity" || desktop.contains("gnome"))
|
||||||
{
|
{
|
||||||
qDebug() << "SystemTrayIcon: Using Unity backend";
|
qDebug() << "SystemTrayIcon: Using Unity backend";
|
||||||
|
gtk_init(nullptr, nullptr);
|
||||||
QString settingsDir = Settings::getSettingsDirPath();
|
QString settingsDir = Settings::getSettingsDirPath();
|
||||||
QFile iconFile(settingsDir+"/icon.png");
|
QFile iconFile(settingsDir+"/icon.png");
|
||||||
if (iconFile.open(QIODevice::Truncate | QIODevice::WriteOnly))
|
if (iconFile.open(QIODevice::Truncate | QIODevice::WriteOnly))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user