feat: implement custom close behavior for Amnezia application on different platforms
This commit is contained in:
parent
4f2d9b4fa9
commit
7aacd15a4c
5 changed files with 30 additions and 26 deletions
|
|
@ -41,9 +41,11 @@ SystemTrayNotificationHandler::SystemTrayNotificationHandler(QObject* parent) :
|
|||
QDesktopServices::openUrl(QUrl("https://amnezia.org"));
|
||||
});
|
||||
|
||||
m_trayActionQuit = m_menu.addAction(QIcon(":/images/tray/cancel.png"), tr("Quit") + " " + APPLICATION_NAME, this, [&](){
|
||||
qApp->quit();
|
||||
});
|
||||
// Quit action: disconnect VPN first on macOS NE, else quit directly
|
||||
m_trayActionQuit = m_menu.addAction(QIcon(":/images/tray/cancel.png"),
|
||||
tr("Quit") + " " + APPLICATION_NAME,
|
||||
this,
|
||||
[&](){ qApp->quit(); });
|
||||
|
||||
m_systemTrayIcon.setContextMenu(&m_menu);
|
||||
setTrayState(Vpn::ConnectionState::Disconnected);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue