added signal-slot connection between corecontroller and systemtraynofificationhandler updating websiteurl
This commit is contained in:
parent
979ab42c5a
commit
95d48d8a2d
4 changed files with 19 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ SystemTrayNotificationHandler::SystemTrayNotificationHandler(QObject* parent) :
|
|||
m_menu.addSeparator();
|
||||
|
||||
m_trayActionVisitWebSite = m_menu.addAction(QIcon(":/images/tray/link.png"), tr("Visit Website"), [&](){
|
||||
QDesktopServices::openUrl(QUrl("https://amnezia.org"));
|
||||
QDesktopServices::openUrl(QUrl(websiteUrl));
|
||||
});
|
||||
|
||||
m_trayActionQuit = m_menu.addAction(QIcon(":/images/tray/cancel.png"), tr("Quit") + " " + APPLICATION_NAME, this, [&](){
|
||||
|
|
@ -64,6 +64,11 @@ void SystemTrayNotificationHandler::onTranslationsUpdated()
|
|||
m_trayActionQuit->setText(tr("Quit")+ " " + APPLICATION_NAME);
|
||||
}
|
||||
|
||||
void SystemTrayNotificationHandler::updateWebsiteUrl(const QString &newWebsiteUrl) {
|
||||
qDebug() << "Updated website URL:" << newWebsiteUrl;
|
||||
websiteUrl = newWebsiteUrl;
|
||||
}
|
||||
|
||||
void SystemTrayNotificationHandler::setTrayIcon(const QString &iconPath)
|
||||
{
|
||||
QIcon trayIconMask(QPixmap(iconPath).scaled(128,128));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue