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

Prevent connection activation from freezing plasma-desktop for a few

seconds.

BUG: 286424
parent d92d3607
......@@ -100,11 +100,15 @@ void ActivatableItem::emitClicked()
remote->activationState() == Knm::InterfaceConnection::Activated)) {
emit showInterfaceDetails(remote->deviceUni());
} else {
m_activatable->activate();
QTimer::singleShot(0, m_activatable, SLOT(activate()));
}
emit clicked(this);
}
QTimer::singleShot(0, this, SLOT(notifyNetworkingState()));
}
void ActivatableItem::notifyNetworkingState()
{
if (!NetworkManager::isNetworkingEnabled()) {
KNotification::event(Event::NetworkingDisabled, i18nc("@info:status Notification when the networking subsystem (NetworkManager, etc) is disabled", "Networking system disabled"), QPixmap(), 0, KNotification::CloseOnTimeout, *s_networkManagementComponentData)->sendEvent();
} else if (!NetworkManager::isWirelessEnabled() &&
......
......@@ -56,6 +56,7 @@ protected Q_SLOTS:
void handleHasDefaultRouteChanged(bool);
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
void activationStateChanged(Knm::InterfaceConnection::ActivationState oldState, Knm::InterfaceConnection::ActivationState newState);
void notifyNetworkingState();
protected:
RemoteActivatable *m_activatable;
......
#ifndef PLASMA_NM_VERSION_H
#define PLASMA_NM_VERSION_H
static const char * plasmaNmVersion = "0.9.1_rc1 (master 20111112)";
static const char * plasmaNmVersion = "0.9.1_rc1 (master 20111113)";
#endif
Markdown is supported
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