author | tille <tille> | 2003-05-25 18:19:04 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-25 18:19:04 (UTC) |
commit | 2ec401058a04c15d2725c94d38226d0ac4505496 (patch) (unidiff) | |
tree | bbe34da6b452cb01f31e5a08acf114c8c9641c32 /noncore/settings/networksettings/ppp/pppconfig.cpp | |
parent | 7e1dce1560e45ef7fad91a8da2d0d96c1b166df9 (diff) | |
download | opie-2ec401058a04c15d2725c94d38226d0ac4505496.zip opie-2ec401058a04c15d2725c94d38226d0ac4505496.tar.gz opie-2ec401058a04c15d2725c94d38226d0ac4505496.tar.bz2 |
saves configured interfaces now
Diffstat (limited to 'noncore/settings/networksettings/ppp/pppconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppconfig.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/ppp/pppconfig.cpp b/noncore/settings/networksettings/ppp/pppconfig.cpp index e2521a6..4c5f7aa 100644 --- a/noncore/settings/networksettings/ppp/pppconfig.cpp +++ b/noncore/settings/networksettings/ppp/pppconfig.cpp | |||
@@ -17,26 +17,31 @@ PPPConfigWidget::PPPConfigWidget( Interface* iface, QWidget *parent, | |||
17 | : QDialog(parent, name, modal, fl) | 17 | : QDialog(parent, name, modal, fl) |
18 | { | 18 | { |
19 | setCaption(tr("Configure Modem")); | 19 | setCaption(tr("Configure Modem")); |
20 | int result = runTests(); | 20 | int result = runTests(); |
21 | if(result == TEST_CRITICAL){ | 21 | if(result == TEST_CRITICAL){ |
22 | QMessageBox::critical(0, tr("Modem failure"), tr("A critical failure appeard while testing the modem") ); | 22 | QMessageBox::critical(0, tr("Modem failure"), tr("A critical failure appeard while testing the modem") ); |
23 | return; | 23 | return; |
24 | } | 24 | } |
25 | 25 | ||
26 | interface = iface; | 26 | interface = iface; |
27 | if (!PPPData::data()->setModemDevice( interface->getInterfaceName() )) | 27 | if (!PPPData::data()->setModemDevice( interface->getInterfaceName() )) |
28 | PPPData::data()->setModemDevice("/dev/modem"); | 28 | PPPData::data()->setModemDevice("/dev/modem"); |
29 | qDebug("PPPConfigWidget::PPPConfigWidget"); | ||
30 | qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); | ||
29 | if (!PPPData::data()->setAccount( interface->getHardwareName() )) | 31 | if (!PPPData::data()->setAccount( interface->getHardwareName() )) |
30 | PPPData::data()->setAccount( 0 ); | 32 | PPPData::data()->setAccount( 0 ); |
33 | |||
34 | qDebug(" PPPData::data()->accname >%s<",PPPData::data()->accname().latin1()); | ||
35 | qDebug(" PPPData::data()->currentAccountID() >%i<",PPPData::data()->currentAccountID()); | ||
31 | (void)new Modem; | 36 | (void)new Modem; |
32 | 37 | ||
33 | QVBoxLayout *layout = new QVBoxLayout( this ); | 38 | QVBoxLayout *layout = new QVBoxLayout( this ); |
34 | layout->setSpacing( 0 ); | 39 | layout->setSpacing( 0 ); |
35 | layout->setMargin( 1 ); | 40 | layout->setMargin( 1 ); |
36 | tabWindow = new QTabWidget( this, "tabWidget" ); | 41 | tabWindow = new QTabWidget( this, "tabWidget" ); |
37 | layout->addWidget( tabWindow ); | 42 | layout->addWidget( tabWindow ); |
38 | 43 | ||
39 | accounts = new AccountWidget( tabWindow, "accounts" ); | 44 | accounts = new AccountWidget( tabWindow, "accounts" ); |
40 | tabWindow->addTab( accounts, tr("&Accounts") ); | 45 | tabWindow->addTab( accounts, tr("&Accounts") ); |
41 | modem1 = new ModemWidget( tabWindow, "modem1" ); | 46 | modem1 = new ModemWidget( tabWindow, "modem1" ); |
42 | tabWindow->addTab( modem1, tr("&Device") ); | 47 | tabWindow->addTab( modem1, tr("&Device") ); |
@@ -46,24 +51,27 @@ PPPConfigWidget::PPPConfigWidget( Interface* iface, QWidget *parent, | |||
46 | // general = new GeneralWidget( tabWindow->addPage( tr("M&isc"), tr("Miscellaneous Settings") ) ); | 51 | // general = new GeneralWidget( tabWindow->addPage( tr("M&isc"), tr("Miscellaneous Settings") ) ); |
47 | 52 | ||
48 | } | 53 | } |
49 | 54 | ||
50 | 55 | ||
51 | PPPConfigWidget::~PPPConfigWidget() | 56 | PPPConfigWidget::~PPPConfigWidget() |
52 | { | 57 | { |
53 | 58 | ||
54 | } | 59 | } |
55 | 60 | ||
56 | void PPPConfigWidget::accept() | 61 | void PPPConfigWidget::accept() |
57 | { | 62 | { |
63 | qDebug("PPPConfigWidget::accept"); | ||
64 | qDebug(" PPPData::data()->accname >%s<",PPPData::data()->accname().latin1()); | ||
65 | qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); | ||
58 | interface->setInterfaceName( PPPData::data()->modemDevice() ); | 66 | interface->setInterfaceName( PPPData::data()->modemDevice() ); |
59 | interface->setHardwareName( PPPData::data()->accname() ); | 67 | interface->setHardwareName( PPPData::data()->accname() ); |
60 | PPPData::data()->save(); | 68 | PPPData::data()->save(); |
61 | QDialog::accept(); | 69 | QDialog::accept(); |
62 | } | 70 | } |
63 | 71 | ||
64 | 72 | ||
65 | void PPPConfigWidget::reject() | 73 | void PPPConfigWidget::reject() |
66 | { | 74 | { |
67 | PPPData::data()->cancel(); | 75 | PPPData::data()->cancel(); |
68 | QDialog::reject(); | 76 | QDialog::reject(); |
69 | } | 77 | } |