Diffstat (limited to 'noncore/settings/networksettings/ppp/pppconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppconfig.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/noncore/settings/networksettings/ppp/pppconfig.cpp b/noncore/settings/networksettings/ppp/pppconfig.cpp index c0f1fef..e2521a6 100644 --- a/noncore/settings/networksettings/ppp/pppconfig.cpp +++ b/noncore/settings/networksettings/ppp/pppconfig.cpp @@ -6,23 +6,28 @@ #include "accounts.h" #include "general.h" +#include "interface.h" +#include "modem.h" #include "pppconfig.h" #include "pppdata.h" #include "runtests.h" -#include "modem.h" -PPPConfigWidget::PPPConfigWidget( QWidget *parent, const char *name, +PPPConfigWidget::PPPConfigWidget( Interface* iface, QWidget *parent, + const char *name, bool modal, WFlags fl ) : QDialog(parent, name, modal, fl) { setCaption(tr("Configure Modem")); - int result = runTests(); - if(result == TEST_CRITICAL){ - QMessageBox::critical(0, tr("Modem failure"), tr("A critical failure appeard while testing the modem") ); - return; - } - -// setFixedSize(sizeHint()); + int result = runTests(); + if(result == TEST_CRITICAL){ + QMessageBox::critical(0, tr("Modem failure"), tr("A critical failure appeard while testing the modem") ); + return; + } - (void)new Modem; + interface = iface; + if (!PPPData::data()->setModemDevice( interface->getInterfaceName() )) + PPPData::data()->setModemDevice("/dev/modem"); + if (!PPPData::data()->setAccount( interface->getHardwareName() )) + PPPData::data()->setAccount( 0 ); + (void)new Modem; QVBoxLayout *layout = new QVBoxLayout( this ); @@ -51,4 +56,6 @@ PPPConfigWidget::~PPPConfigWidget() void PPPConfigWidget::accept() { + interface->setInterfaceName( PPPData::data()->modemDevice() ); + interface->setHardwareName( PPPData::data()->accname() ); PPPData::data()->save(); QDialog::accept(); |