added signal-slot connection between corecontroller and systemtraynofificationhandler updating websiteurl

This commit is contained in:
Mitternacht822 2025-07-02 17:47:09 +04:00
parent 979ab42c5a
commit 95d48d8a2d
4 changed files with 19 additions and 1 deletions

View file

@ -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));