Diffstat (limited to 'noncore/settings/networksettings/ppp/pppconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppconfig.cpp | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/noncore/settings/networksettings/ppp/pppconfig.cpp b/noncore/settings/networksettings/ppp/pppconfig.cpp index 4c5f7aa..63f9335 100644 --- a/noncore/settings/networksettings/ppp/pppconfig.cpp +++ b/noncore/settings/networksettings/ppp/pppconfig.cpp | |||
@@ -4,15 +4,15 @@ | |||
4 | #include <qtabwidget.h> | 4 | #include <qtabwidget.h> |
5 | 5 | ||
6 | #include "accounts.h" | 6 | #include "accounts.h" |
7 | #include "general.h" | 7 | #include "general.h" |
8 | #include "interface.h" | 8 | #include "interfaceppp.h" |
9 | #include "modem.h" | 9 | #include "modem.h" |
10 | #include "pppconfig.h" | 10 | #include "pppconfig.h" |
11 | #include "pppdata.h" | 11 | #include "pppdata.h" |
12 | #include "runtests.h" | 12 | #include "runtests.h" |
13 | 13 | ||
14 | PPPConfigWidget::PPPConfigWidget( Interface* iface, QWidget *parent, | 14 | PPPConfigWidget::PPPConfigWidget( InterfacePPP* iface, QWidget *parent, |
15 | const char *name, | 15 | const char *name, |
16 | bool modal, WFlags fl ) | 16 | bool modal, WFlags fl ) |
17 | : QDialog(parent, name, modal, fl) | 17 | : QDialog(parent, name, modal, fl) |
18 | { | 18 | { |
@@ -23,30 +23,25 @@ PPPConfigWidget::PPPConfigWidget( Interface* iface, QWidget *parent, | |||
23 | return; | 23 | return; |
24 | } | 24 | } |
25 | 25 | ||
26 | interface = iface; | 26 | interface = iface; |
27 | if (!PPPData::data()->setModemDevice( interface->getInterfaceName() )) | ||
28 | PPPData::data()->setModemDevice("/dev/modem"); | ||
29 | qDebug("PPPConfigWidget::PPPConfigWidget"); | 27 | qDebug("PPPConfigWidget::PPPConfigWidget"); |
30 | qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); | 28 | qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); |
31 | if (!PPPData::data()->setAccount( interface->getHardwareName() )) | ||
32 | PPPData::data()->setAccount( 0 ); | ||
33 | 29 | ||
34 | qDebug(" PPPData::data()->accname >%s<",PPPData::data()->accname().latin1()); | 30 | qDebug(" _pppdata->accname >%s<",interface->data()->accname().latin1()); |
35 | qDebug(" PPPData::data()->currentAccountID() >%i<",PPPData::data()->currentAccountID()); | 31 | qDebug(" _pppdata->currentAccountID() >%i<",interface->data()->currentAccountID()); |
36 | (void)new Modem; | ||
37 | 32 | ||
38 | QVBoxLayout *layout = new QVBoxLayout( this ); | 33 | QVBoxLayout *layout = new QVBoxLayout( this ); |
39 | layout->setSpacing( 0 ); | 34 | layout->setSpacing( 0 ); |
40 | layout->setMargin( 1 ); | 35 | layout->setMargin( 1 ); |
41 | tabWindow = new QTabWidget( this, "tabWidget" ); | 36 | tabWindow = new QTabWidget( this, "tabWidget" ); |
42 | layout->addWidget( tabWindow ); | 37 | layout->addWidget( tabWindow ); |
43 | 38 | ||
44 | accounts = new AccountWidget( tabWindow, "accounts" ); | 39 | accounts = new AccountWidget( interface->data(), tabWindow, "accounts" ); |
45 | tabWindow->addTab( accounts, tr("&Accounts") ); | 40 | tabWindow->addTab( accounts, tr("&Accounts") ); |
46 | modem1 = new ModemWidget( tabWindow, "modem1" ); | 41 | modem1 = new ModemWidget( interface, tabWindow, "modem1" ); |
47 | tabWindow->addTab( modem1, tr("&Device") ); | 42 | tabWindow->addTab( modem1, tr("&Device") ); |
48 | modem2 = new ModemWidget2( tabWindow, "modem2" ); | 43 | modem2 = new ModemWidget2( interface, tabWindow, "modem2" ); |
49 | tabWindow->addTab( modem2, tr("&Modem") ); | 44 | tabWindow->addTab( modem2, tr("&Modem") ); |
50 | // graph = new GraphSetup( tabWindow->addPage( tr("&Graph"), tr("Throughput Graph" ) ) ); | 45 | // graph = new GraphSetup( tabWindow->addPage( tr("&Graph"), tr("Throughput Graph" ) ) ); |
51 | // general = new GeneralWidget( tabWindow->addPage( tr("M&isc"), tr("Miscellaneous Settings") ) ); | 46 | // general = new GeneralWidget( tabWindow->addPage( tr("M&isc"), tr("Miscellaneous Settings") ) ); |
52 | 47 | ||
@@ -60,18 +55,18 @@ PPPConfigWidget::~PPPConfigWidget() | |||
60 | 55 | ||
61 | void PPPConfigWidget::accept() | 56 | void PPPConfigWidget::accept() |
62 | { | 57 | { |
63 | qDebug("PPPConfigWidget::accept"); | 58 | qDebug("PPPConfigWidget::accept"); |
64 | qDebug(" PPPData::data()->accname >%s<",PPPData::data()->accname().latin1()); | 59 | qDebug(" _pppdata->accname >%s<",interface->data()->accname().latin1()); |
65 | qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); | 60 | qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); |
66 | interface->setInterfaceName( PPPData::data()->modemDevice() ); | 61 | interface->setInterfaceName( interface->data()->modemDevice() ); |
67 | interface->setHardwareName( PPPData::data()->accname() ); | 62 | interface->setHardwareName( interface->data()->accname() ); |
68 | PPPData::data()->save(); | 63 | interface->data()->save(); |
69 | QDialog::accept(); | 64 | QDialog::accept(); |
70 | } | 65 | } |
71 | 66 | ||
72 | 67 | ||
73 | void PPPConfigWidget::reject() | 68 | void PPPConfigWidget::reject() |
74 | { | 69 | { |
75 | PPPData::data()->cancel(); | 70 | interface->data()->cancel(); |
76 | QDialog::reject(); | 71 | QDialog::reject(); |
77 | } | 72 | } |