added logic to the connect to vpn button
This commit is contained in:
parent
35d4222c7a
commit
116fa6777b
27 changed files with 293 additions and 125 deletions
|
|
@ -52,9 +52,9 @@ NotificationHandler::~NotificationHandler() {
|
|||
s_instance = nullptr;
|
||||
}
|
||||
|
||||
void NotificationHandler::setConnectionState(VpnProtocol::VpnConnectionState state)
|
||||
void NotificationHandler::setConnectionState(Vpn::ConnectionState state)
|
||||
{
|
||||
if (state != VpnProtocol::Connected && state != VpnProtocol::Disconnected) {
|
||||
if (state != Vpn::ConnectionState::Connected && state != Vpn::ConnectionState::Disconnected) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -62,14 +62,14 @@ void NotificationHandler::setConnectionState(VpnProtocol::VpnConnectionState sta
|
|||
QString message;
|
||||
|
||||
switch (state) {
|
||||
case VpnProtocol::VpnConnectionState::Connected:
|
||||
case Vpn::ConnectionState::Connected:
|
||||
m_connected = true;
|
||||
|
||||
title = tr("AmneziaVPN");
|
||||
message = tr("VPN Connected");
|
||||
break;
|
||||
|
||||
case VpnProtocol::VpnConnectionState::Disconnected:
|
||||
case Vpn::ConnectionState::Disconnected:
|
||||
if (m_connected) {
|
||||
m_connected = false;
|
||||
title = tr("AmneziaVPN");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue