mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
check for no systray, fixes #908
cant believe it took this long to figure out ;_;
This commit is contained in:
parent
eacef9834f
commit
5cb1b6fe8e
|
@ -125,7 +125,8 @@ void Widget::init()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qWarning() << "No system tray detected!";
|
qWarning() << "Widget: No system tray detected!";
|
||||||
|
icon = nullptr;
|
||||||
this->show();
|
this->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,17 +296,19 @@ void Widget::setTranslation()
|
||||||
|
|
||||||
void Widget::updateTrayIcon()
|
void Widget::updateTrayIcon()
|
||||||
{
|
{
|
||||||
|
if (!icon)
|
||||||
|
return;
|
||||||
QString status = ui->statusButton->property("status").toString();
|
QString status = ui->statusButton->property("status").toString();
|
||||||
QString icon;
|
QString pic;
|
||||||
if(status == "online")
|
if (status == "online")
|
||||||
icon = ":img/taskbar/taskbar_online_2x.png";
|
pic = ":img/taskbar/taskbar_online_2x.png";
|
||||||
else if(status == "away")
|
else if (status == "away")
|
||||||
icon = ":img/taskbar/taskbar_idle_2x.png";
|
pic = ":img/taskbar/taskbar_idle_2x.png";
|
||||||
else if(status == "busy")
|
else if (status == "busy")
|
||||||
icon = ":img/taskbar/taskbar_busy_2x.png";
|
pic = ":img/taskbar/taskbar_busy_2x.png";
|
||||||
else
|
else
|
||||||
icon = ":img/taskbar/taskbar_offline_2x.png";
|
pic = ":img/taskbar/taskbar_offline_2x.png";
|
||||||
this->icon->setIcon(QIcon(icon));
|
icon->setIcon(QIcon(pic));
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget::~Widget()
|
Widget::~Widget()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user