|
|
|
@ -26,6 +26,8 @@
|
|
|
|
|
#include <kdebug.h>
|
|
|
|
|
#include <klocale.h>
|
|
|
|
|
#include <kiconloader.h>
|
|
|
|
|
#include <knotifyclient.h>
|
|
|
|
|
#include <knotifydialog.h>
|
|
|
|
|
|
|
|
|
|
// TDENM includes
|
|
|
|
|
#include "vpn_tray_component.h"
|
|
|
|
@ -161,9 +163,22 @@ void VPNTrayComponent::addMenuItems(KPopupMenu* menu)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void VPNTrayComponent::vpnEventHandler(TDENetworkVPNEventType::TDENetworkVPNEventType event, TQString message) {
|
|
|
|
|
kdDebug() << "Tray::vpnEventHandler" << endl;
|
|
|
|
|
|
|
|
|
|
if (event == TDENetworkVPNEventType::Failure) {
|
|
|
|
|
KNotifyClient::event( tray()->winId(), "tdenm-nm-vpn-connection-attempt-failed", i18n(message) );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
VPNTrayComponent::VPNTrayComponent (KSystemTray * parent, const char * name )
|
|
|
|
|
: TrayComponent (parent, name)
|
|
|
|
|
{
|
|
|
|
|
TDEGlobalNetworkManager* nm = KGlobal::networkManager();
|
|
|
|
|
|
|
|
|
|
// Monitor VPN messages
|
|
|
|
|
connect(nm, SIGNAL(vpnEvent(TDENetworkVPNEventType::TDENetworkVPNEventType, TQString)), this, SLOT(vpnEventHandler(TDENetworkVPNEventType::TDENetworkVPNEventType, TQString)));
|
|
|
|
|
|
|
|
|
|
//Actions used for plugging into the menu
|
|
|
|
|
new KAction (i18n ("New connection ..."),
|
|
|
|
|
SmallIcon ("encrypted", TQIconSet::Automatic), 0,
|
|
|
|
|