@ -33,13 +33,14 @@
# include <tqlabel.h>
# include <tqlabel.h>
# include <tqpopupmenu.h>
# include <tqpopupmenu.h>
// k de headers
// t de headers
# include <kiconloader.h>
# include <kiconloader.h>
# include <kdebug.h>
# include <kdebug.h>
# include <kpushbutton.h>
# include <kpushbutton.h>
# include <klistview.h>
# include <klistview.h>
# include <klocale.h>
# include <klocale.h>
# include <kcombobox.h>
# include <kcombobox.h>
# include <kmessagebox.h>
// tdenm headers
// tdenm headers
# include "tdenetman-connection_editor.h"
# 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 ( ) ) ) ;
popup - > insertItem ( KGlobal : : iconLoader ( ) - > loadIcon ( " wired " , KIcon : : Small ) , i18n ( " Wired " ) , this , TQT_SLOT ( slotNewWiredConnection ( ) ) ) ;
// if (!VPNManager::getVPNServices().isEmpty()) {
// 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 ) ;
pbNew - > setPopup ( popup ) ;
@ -158,7 +159,7 @@ void ConnectionEditorImpl::slotNewWiredConnection()
*/
*/
void ConnectionEditorImpl : : slotNewVPNConnection ( )
void ConnectionEditorImpl : : slotNewVPNConnection ( )
{
{
// slotEditNewConnection(new TDEVPNConnection());
slotEditNewConnection ( new TDEVPNConnection ( ) ) ;
}
}
/*
/*
@ -174,6 +175,11 @@ void ConnectionEditorImpl::slotEditNewConnection(TDENetworkConnection* conn)
void ConnectionEditorImpl : : slotRefreshConnectionList ( )
void ConnectionEditorImpl : : slotRefreshConnectionList ( )
{
{
TDEGlobalNetworkManager * nm = KGlobal : : networkManager ( ) ;
if ( ! nm ) {
return ;
}
nm - > loadConnectionInformation ( ) ;
fillConnectionList ( ) ;
fillConnectionList ( ) ;
}
}
@ -224,7 +230,9 @@ void ConnectionEditorImpl::slotRemoveCurrentConnection()
lvConnections - > takeItem ( item ) ;
lvConnections - > takeItem ( item ) ;
delete 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 " ) ) ;
}
}
}
/*
/*