mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
SystemTrayIcon: Log what backend is used
This commit is contained in:
parent
0fabab8f1d
commit
84e613c609
|
@ -13,6 +13,7 @@ SystemTrayIcon::SystemTrayIcon()
|
||||||
#ifdef ENABLE_SYSTRAY_UNITY_BACKEND
|
#ifdef ENABLE_SYSTRAY_UNITY_BACKEND
|
||||||
else if (desktop.toLower() == "unity")
|
else if (desktop.toLower() == "unity")
|
||||||
{
|
{
|
||||||
|
qDebug() << "SystemTrayIcon: Using Unity backend";
|
||||||
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))
|
||||||
|
@ -37,6 +38,7 @@ SystemTrayIcon::SystemTrayIcon()
|
||||||
#ifdef ENABLE_SYSTRAY_STATUSNOTIFIER_BACKEND
|
#ifdef ENABLE_SYSTRAY_STATUSNOTIFIER_BACKEND
|
||||||
else if (true)
|
else if (true)
|
||||||
{
|
{
|
||||||
|
qDebug() << "SystemTrayIcon: Using Status Notifier backend";
|
||||||
backendType = SystrayBackendType::StatusNotifier;
|
backendType = SystrayBackendType::StatusNotifier;
|
||||||
gtk_init(nullptr, nullptr);
|
gtk_init(nullptr, nullptr);
|
||||||
snMenu = gtk_menu_new();
|
snMenu = gtk_menu_new();
|
||||||
|
@ -65,6 +67,7 @@ SystemTrayIcon::SystemTrayIcon()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
qDebug() << "SystemTrayIcon: Using Qt backend";
|
||||||
qtIcon = new QSystemTrayIcon;
|
qtIcon = new QSystemTrayIcon;
|
||||||
backendType = SystrayBackendType::Qt;
|
backendType = SystrayBackendType::Qt;
|
||||||
connect(qtIcon, &QSystemTrayIcon::activated, this, &SystemTrayIcon::activated);
|
connect(qtIcon, &QSystemTrayIcon::activated, this, &SystemTrayIcon::activated);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user