diff options
Diffstat (limited to 'tdenetworkmanager/src/tdenetman-connection_editor.cpp')
-rw-r--r-- | tdenetworkmanager/src/tdenetman-connection_editor.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tdenetworkmanager/src/tdenetman-connection_editor.cpp b/tdenetworkmanager/src/tdenetman-connection_editor.cpp index 994105a..a0a4e83 100644 --- a/tdenetworkmanager/src/tdenetman-connection_editor.cpp +++ b/tdenetworkmanager/src/tdenetman-connection_editor.cpp @@ -33,13 +33,14 @@ #include <tqlabel.h> #include <tqpopupmenu.h> -// kde headers +// tde headers #include <kiconloader.h> #include <kdebug.h> #include <kpushbutton.h> #include <klistview.h> #include <klocale.h> #include <kcombobox.h> +#include <kmessagebox.h> // tdenm headers #include "tdenetman-connection_editor.h" @@ -110,7 +111,7 @@ ConnectionEditorImpl::ConnectionEditorImpl(TQWidget* parent, const char* name, b popup->insertItem(KGlobal::iconLoader()->loadIcon("wired", KIcon::Small), i18n("Wired"), this, TQT_SLOT(slotNewWiredConnection())); // if (!VPNManager::getVPNServices().isEmpty()) { -// popup->insertItem(KGlobal::iconLoader()->loadIcon("encrypted", KIcon::Small), i18n("VPN"), this, TQT_SLOT(slotNewVPNConnection())); + popup->insertItem(KGlobal::iconLoader()->loadIcon("encrypted", KIcon::Small), i18n("VPN"), this, TQT_SLOT(slotNewVPNConnection())); // } pbNew->setPopup(popup); @@ -158,7 +159,7 @@ void ConnectionEditorImpl::slotNewWiredConnection() */ void ConnectionEditorImpl::slotNewVPNConnection() { -// slotEditNewConnection(new TDEVPNConnection()); + slotEditNewConnection(new TDEVPNConnection()); } /* @@ -174,6 +175,11 @@ void ConnectionEditorImpl::slotEditNewConnection(TDENetworkConnection* conn) void ConnectionEditorImpl::slotRefreshConnectionList() { + TDEGlobalNetworkManager* nm = KGlobal::networkManager(); + if (!nm) { + return; + } + nm->loadConnectionInformation(); fillConnectionList(); } @@ -224,7 +230,9 @@ void ConnectionEditorImpl::slotRemoveCurrentConnection() lvConnections->takeItem(item); delete item; - nm->deleteConnection(conn->UUID); + if (!nm->deleteConnection(conn->UUID)) { + KMessageBox::error(this, i18n("<qt><b>Unable to delete network connection!</b><p>Potential causes:<br> * Insufficient permissions<br> * NetworkManager not running<br> * DBUS failure</qt>"), i18n("Unable to perform requested operation")); + } } /* |