author | benmeyer <benmeyer> | 2002-10-30 15:36:45 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-30 15:36:45 (UTC) |
commit | a22f8dd98789f4638ab241d281d4319e0ed911ba (patch) (unidiff) | |
tree | 93131daa22042c2c3fbd52f52a90edb1e8fae92c /noncore/settings/networksettings/interfaces | |
parent | bc95eea1eda31b458e5342695b3ffe246d5ab006 (diff) | |
download | opie-a22f8dd98789f4638ab241d281d4319e0ed911ba.zip opie-a22f8dd98789f4638ab241d281d4319e0ed911ba.tar.gz opie-a22f8dd98789f4638ab241d281d4319e0ed911ba.tar.bz2 |
Re-added profile information which makes interfaces work again
Diffstat (limited to 'noncore/settings/networksettings/interfaces') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/networksettings/interfaces/interfacesetupimp.h | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp index 97c05cc..d42b45d 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | |||
@@ -90,12 +90,13 @@ bool InterfaceSetupImp::saveSettings(){ | |||
90 | * @profile the new profile. | 90 | * @profile the new profile. |
91 | */ | 91 | */ |
92 | void InterfaceSetupImp::setProfile(const QString &profile){ | 92 | void InterfaceSetupImp::setProfile(const QString &profile){ |
93 | QString newInterfaceName = interface->getInterfaceName(); | 93 | QString newInterfaceName = interface->getInterfaceName(); |
94 | if(profile.length() > 0) | 94 | if(profile.length() > 0) |
95 | newInterfaceName += "_" + profile; | 95 | newInterfaceName += "_" + profile; |
96 | qDebug("InterfaceSetupImp::setProfile"); | ||
96 | // See if we have to make a interface. | 97 | // See if we have to make a interface. |
97 | if(!interfaces->setInterface(newInterfaceName)){ | 98 | if(!interfaces->setInterface(newInterfaceName)){ |
98 | // Add making for this new interface if need too | 99 | // Add making for this new interface if need too |
99 | if(profile != ""){ | 100 | if(profile != ""){ |
100 | interfaces->copyInterface(interface->getInterfaceName(), newInterfaceName); | 101 | interfaces->copyInterface(interface->getInterfaceName(), newInterfaceName); |
101 | if(!interfaces->setMapping(interface->getInterfaceName())){ | 102 | if(!interfaces->setMapping(interface->getInterfaceName())){ |
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.h b/noncore/settings/networksettings/interfaces/interfacesetupimp.h index 936f2be..3bbf34e 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.h +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.h | |||
@@ -26,24 +26,30 @@ private: | |||
26 | 26 | ||
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | 28 | ||
29 | class InterfaceSetupImpDialog : public QDialog { | 29 | class InterfaceSetupImpDialog : public QDialog { |
30 | Q_OBJECT | 30 | Q_OBJECT |
31 | 31 | ||
32 | public: | 32 | public: |
33 | InterfaceSetupImpDialog(QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = false, WFlags fl = 0) : QDialog(parent, name, modal, fl){ | 33 | InterfaceSetupImpDialog(QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = false, WFlags fl = 0) : QDialog(parent, name, modal, fl){ |
34 | QVBoxLayout *InterfaceSetupLayout = new QVBoxLayout( this ); | 34 | QVBoxLayout *InterfaceSetupLayout = new QVBoxLayout( this ); |
35 | setCaption("Interface Setup"); | 35 | setCaption("Interface Setup"); |
36 | interfaceSetup = new InterfaceSetupImp(this, "InterfaceSetup",i,fl); | 36 | interfaceSetup = new InterfaceSetupImp(this, "InterfaceSetup",i,fl); |
37 | InterfaceSetupLayout->addWidget( interfaceSetup ); | 37 | InterfaceSetupLayout->addWidget( interfaceSetup ); |
38 | }; | 38 | }; |
39 | void setProfile(QString &profile){ interfaceSetup->setProfile(profile);}; | ||
39 | 40 | ||
41 | private: | ||
40 | InterfaceSetupImp *interfaceSetup; | 42 | InterfaceSetupImp *interfaceSetup; |
41 | 43 | ||
42 | protected slots: | 44 | protected slots: |
43 | void accept(){ interfaceSetup->saveChanges(); }; | 45 | void accept(){ |
46 | interfaceSetup->saveChanges(); | ||
47 | QDialog::accept(); | ||
48 | }; | ||
49 | |||
44 | }; | 50 | }; |
45 | 51 | ||
46 | #endif | 52 | #endif |
47 | 53 | ||
48 | // interfacesetupimp.h | 54 | // interfacesetupimp.h |
49 | 55 | ||