@ -286,20 +286,23 @@ ConnectionSettingsDialogImpl::slotConnect()
TDEGlobalNetworkManager * nm = KGlobal : : networkManager ( ) ;
// add/save the connection
nm - > saveConnection ( _conn ) ;
// activate device
if ( _conn & & nm ) {
// // VPN connection needs a special specific object
// if (_conn->getType() == NM_SETTING_VPN_SETTING_NAME) {
// TQT_DBusObjectPath act_conn = nm->getDefaultActiveConnection();
// TQT_DBusObjectPath device = nm->getDeviceForActiveConnection(act_conn);
// nm->ActivateConnectionAsync(id, "org.freedesktop.NetworkManagerUserSettings", _conn->getObjectPath(), device, act_conn, err);
// }
// else {
// we need to call ActivateDevice async
nm - > initiateConnection ( _conn - > UUID ) ;
// }
if ( nm - > saveConnection ( _conn ) ) {
// activate device
if ( _conn & & nm ) {
// // VPN connection needs a special specific object
// if (_conn->getType() == NM_SETTING_VPN_SETTING_NAME) {
// TQT_DBusObjectPath act_conn = nm->getDefaultActiveConnection();
// TQT_DBusObjectPath device = nm->getDeviceForActiveConnection(act_conn);
// nm->ActivateConnectionAsync(id, "org.freedesktop.NetworkManagerUserSettings", _conn->getObjectPath(), device, act_conn, err);
// }
// else {
// we need to call ActivateDevice async
nm - > initiateConnection ( _conn - > UUID ) ;
// }
}
}
else {
KMessageBox : : error ( this , i18n ( " <qt><b>Unable to save network connection!</b><p>Potential causes:<br> * Insufficient permissions<br> * NetworkManager not running<br> * DBUS failure</qt> " ) , i18n ( " Unable to perform requested operation " ) ) ;
}
emit connectionSaved ( ) ;
@ -325,7 +328,9 @@ ConnectionSettingsDialogImpl::slotSave()
TDEGlobalNetworkManager * nm = KGlobal : : networkManager ( ) ;
// save the connection
nm - > saveConnection ( _conn ) ;
if ( ! nm - > saveConnection ( _conn ) ) {
KMessageBox : : error ( this , i18n ( " <qt><b>Unable to save network connection!</b><p>Potential causes:<br> * Insufficient permissions<br> * NetworkManager not running<br> * DBUS failure</qt> " ) , i18n ( " Unable to perform requested operation " ) ) ;
}
emit connectionSaved ( ) ;
this - > close ( true ) ;