author | zecke <zecke> | 2004-10-14 00:39:47 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-14 00:39:47 (UTC) |
commit | b17b6c77af35b610d236321279d3f18eb3060c90 (patch) (side-by-side diff) | |
tree | 4ff66b2060c91373f86f3fd14890dcb8e98babb6 /noncore/settings/networksettings/ppp/general.cpp | |
parent | 9cc9ed1e746477c59b1fd3d572cdce052f0ccf85 (diff) | |
download | opie-b17b6c77af35b610d236321279d3f18eb3060c90.zip opie-b17b6c77af35b610d236321279d3f18eb3060c90.tar.gz opie-b17b6c77af35b610d236321279d3f18eb3060c90.tar.bz2 |
-Make ModemQuery to use the 'current' configuration
-Todo make FlowControl, LineTermination lwork across locales
for safe and restore
Diffstat (limited to 'noncore/settings/networksettings/ppp/general.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/general.cpp | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp index 40ba19b..5e2a04f 100644 --- a/noncore/settings/networksettings/ppp/general.cpp +++ b/noncore/settings/networksettings/ppp/general.cpp @@ -283,13 +283,12 @@ ModemWidget::~ModemWidget() { edited.simplifyWhiteSpace(); if ( devs.contains( edited ) == 0 ) { devs << edited; } - _pppdata->setModemDevice( edited ); } Config cfg("NetworkSetupPPP"); cfg.setGroup("Devices_General"); cfg.writeEntry("devices",devs,','); @@ -334,24 +333,51 @@ bool ModemWidget::save() { //first check to make sure that the device name is unique! if(modemname->text().isEmpty() || !_pppdata->isUniqueDevname(modemname->text())) return false; - odebug << "ModemWidget::save saving modem1 data" << oendl; _pppdata->setDevname( modemname->text() ); _pppdata->setModemDevice( modemdevice->currentText() ); _pppdata->setFlowcontrol(flowcontrol->currentText()); _pppdata->setFlowcontrol(flowcontrol->currentText()); _pppdata->setSpeed(baud_c->currentText()); _pppdata->setModemLockFile( modemlockfile->isChecked()); _pppdata->setModemTimeout( modemtimeout->value() ); return true; } +void ModemWidget::slotBeforeModemQuery() +{ + m_oldModemDev = _pppdata->modemDevice(); + m_oldFlowControl = _pppdata->flowcontrol(); + m_oldSpeed = _pppdata->speed(); + m_oldModemLock = _pppdata->modemLockFile(); + m_oldModemTimeout = _pppdata->modemTimeout(); + + + _pppdata->setModemDevice( modemdevice->currentText() ); + _pppdata->setFlowcontrol(flowcontrol->currentText()); + _pppdata->setFlowcontrol(flowcontrol->currentText()); + _pppdata->setSpeed(baud_c->currentText()); + _pppdata->setModemLockFile( modemlockfile->isChecked()); + _pppdata->setModemTimeout( modemtimeout->value() ); +} + + +void ModemWidget::slotAfterModemQuery() +{ + _pppdata->setModemDevice( m_oldModemDev ); + _pppdata->setFlowcontrol( m_oldFlowControl ); + _pppdata->setSpeed( m_oldSpeed ); + _pppdata->setModemLockFile( m_oldModemLock ); + _pppdata->setModemTimeout( m_oldModemTimeout ); +} + + ModemWidget2::ModemWidget2( PPPData *pd, InterfacePPP *ip, QWidget *parent, const char *name) : QWidget(parent, name), _pppdata(pd), _ifaceppp(ip) { QVBoxLayout *l1 = new QVBoxLayout(this, 0 );//, KDialog::spacingHint()); @@ -485,14 +511,18 @@ void ModemWidget2::modemcmdsbutton() QPEApplication::execDialog( &mc ); } void ModemWidget2::query_modem() { + emit sig_beforeQueryModem(); + ModemTransfer mt(_ifaceppp->modem(), this); mt.exec(); + + emit sig_afterQueryModem(); } // void ModemWidget2::terminal() { // MiniTerm terminal(NULL,NULL); // terminal.exec(); |