Commit f5c57ab9 authored by Lamarque Souza's avatar Lamarque Souza
Browse files

Distinguish between user deactivation and activation error for vpn connections

as well.

BUG: 320533
FIXED-IN: 0.9.0.9
parent 4706c1c2
......@@ -116,6 +116,9 @@ void InterfaceNotificationHost::interfaceConnectionActivationStateChanged(Knm::I
m_activating.remove(ic);
KNotification::event(Event::Connected, m_interfaceNameLabel, i18nc("@info:status Notification text when a connection has been activated","%1 activated", ic->connectionName()), KIcon(Knm::Connection::iconName(ic->connectionType())).pixmap(QSize(iconSize,iconSize)), 0, KNotification::CloseOnTimeout, m_manager->componentData());
break;
case Knm::InterfaceConnection::Deactivating:
// Ignored.
break;
case Knm::InterfaceConnection::Deactivated:
m_activating.remove(ic);
KNotification::event(Event::Disconnected, m_interfaceNameLabel, i18nc("@info:status Notification text when deactivating a connection","%1 deactivated", ic->connectionName()), KIcon(Knm::Connection::iconName(ic->connectionType())).pixmap(QSize(iconSize,iconSize)), 0, KNotification::CloseOnTimeout, m_manager->componentData());
......@@ -470,13 +473,17 @@ void NotificationManager::handleUpdate(Knm::Activatable *activatable)
kDebug() << ic->connectionName() << "is activated";
KNotification::event(Event::Connected, QString(), i18nc("@info:status Notification text when a connection has been activated","%1 activated", ic->connectionName()), KIcon(Knm::Connection::iconName(ic->connectionType())).pixmap(QSize(iconSize,iconSize)), 0, KNotification::CloseOnTimeout, componentData());
break;
case Knm::InterfaceConnection::Deactivating:
// Ignored.
break;
case Knm::InterfaceConnection::Deactivated:
KNotification::event(Event::Disconnected, QString(), i18nc("@info:status Notification text when deactivating a connection","%1 deactivated", ic->connectionName()), KIcon(Knm::Connection::iconName(ic->connectionType())).pixmap(QSize(iconSize,iconSize)), 0, KNotification::CloseOnTimeout, componentData());
break;
case Knm::InterfaceConnection::Unknown:
kDebug() << ic->connectionName() << "is unknown";
if (ic->oldActivationState() == Knm::InterfaceConnection::Activating)
if (ic->oldActivationState() == Knm::InterfaceConnection::Activating) {
KNotification::event(Event::ConnectFailed, QString(), i18nc("@info:status Notification text when connection has failed","Connection %1 failed", ic->connectionName()), KIcon(Knm::Connection::iconName(ic->connectionType())).pixmap(QSize(iconSize,iconSize)), 0, KNotification::CloseOnTimeout, componentData());
else
KNotification::event(Event::Disconnected, QString(), i18nc("@info:status Notification text when deactivating a connection","%1 deactivated", ic->connectionName()), KIcon(Knm::Connection::iconName(ic->connectionType())).pixmap(QSize(iconSize,iconSize)), 0, KNotification::CloseOnTimeout, componentData());
break;
}
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment