author | benmeyer <benmeyer> | 2002-10-18 18:12:53 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-18 18:12:53 (UTC) |
commit | a63b3b36cf4d665b67733e069bfaad8f96388276 (patch) (unidiff) | |
tree | 0089ca8d5bacd31982d8bec367d091b4f58cace1 /noncore | |
parent | 5ec0d959ca9d3ade0c7271885028fd4309cf2b4c (diff) | |
download | opie-a63b3b36cf4d665b67733e069bfaad8f96388276.zip opie-a63b3b36cf4d665b67733e069bfaad8f96388276.tar.gz opie-a63b3b36cf4d665b67733e069bfaad8f96388276.tar.bz2 |
interfaces now watches for # in most cases
-rw-r--r-- | noncore/net/networksetup/interfaceinformation.ui | 12 | ||||
-rw-r--r-- | noncore/net/networksetup/interfaces.cpp | 10 | ||||
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 4 | ||||
-rw-r--r-- | noncore/net/networksetup/module.h | 8 | ||||
-rw-r--r-- | noncore/settings/networksettings/interfaceinformation.ui | 12 | ||||
-rw-r--r-- | noncore/settings/networksettings/interfaces.cpp | 10 | ||||
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/module.h | 8 |
8 files changed, 34 insertions, 34 deletions
diff --git a/noncore/net/networksetup/interfaceinformation.ui b/noncore/net/networksetup/interfaceinformation.ui index fc99fce..2838d19 100644 --- a/noncore/net/networksetup/interfaceinformation.ui +++ b/noncore/net/networksetup/interfaceinformation.ui | |||
@@ -50,9 +50,9 @@ | |||
50 | <cstring>refreshButton</cstring> | 50 | <cstring>refreshButton</cstring> |
51 | </property> | 51 | </property> |
52 | <property stdset="1"> | 52 | <property stdset="1"> |
53 | <name>text</name> | 53 | <name>text</name> |
54 | <string>Refresh</string> | 54 | <string>&Refresh</string> |
55 | </property> | 55 | </property> |
56 | </widget> | 56 | </widget> |
57 | <widget row="0" column="1" > | 57 | <widget row="0" column="1" > |
58 | <class>QPushButton</class> | 58 | <class>QPushButton</class> |
@@ -61,9 +61,9 @@ | |||
61 | <cstring>stopButton</cstring> | 61 | <cstring>stopButton</cstring> |
62 | </property> | 62 | </property> |
63 | <property stdset="1"> | 63 | <property stdset="1"> |
64 | <name>text</name> | 64 | <name>text</name> |
65 | <string>Stop</string> | 65 | <string>S&top</string> |
66 | </property> | 66 | </property> |
67 | </widget> | 67 | </widget> |
68 | <widget row="1" column="1" > | 68 | <widget row="1" column="1" > |
69 | <class>QPushButton</class> | 69 | <class>QPushButton</class> |
@@ -72,9 +72,9 @@ | |||
72 | <cstring>restartButton</cstring> | 72 | <cstring>restartButton</cstring> |
73 | </property> | 73 | </property> |
74 | <property stdset="1"> | 74 | <property stdset="1"> |
75 | <name>text</name> | 75 | <name>text</name> |
76 | <string>Restart</string> | 76 | <string>R&estart</string> |
77 | </property> | 77 | </property> |
78 | </widget> | 78 | </widget> |
79 | <widget row="0" column="0" > | 79 | <widget row="0" column="0" > |
80 | <class>QPushButton</class> | 80 | <class>QPushButton</class> |
@@ -83,9 +83,9 @@ | |||
83 | <cstring>startButton</cstring> | 83 | <cstring>startButton</cstring> |
84 | </property> | 84 | </property> |
85 | <property stdset="1"> | 85 | <property stdset="1"> |
86 | <name>text</name> | 86 | <name>text</name> |
87 | <string>Start</string> | 87 | <string>&Start</string> |
88 | </property> | 88 | </property> |
89 | </widget> | 89 | </widget> |
90 | </grid> | 90 | </grid> |
91 | </widget> | 91 | </widget> |
@@ -292,9 +292,9 @@ | |||
292 | <cstring>advancedButton</cstring> | 292 | <cstring>advancedButton</cstring> |
293 | </property> | 293 | </property> |
294 | <property stdset="1"> | 294 | <property stdset="1"> |
295 | <name>text</name> | 295 | <name>text</name> |
296 | <string>View Advanced Information</string> | 296 | <string>View &Advanced Information</string> |
297 | </property> | 297 | </property> |
298 | </widget> | 298 | </widget> |
299 | </hbox> | 299 | </hbox> |
300 | </widget> | 300 | </widget> |
@@ -332,10 +332,8 @@ | |||
332 | <name>image0</name> | 332 | <name>image0</name> |
333 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> | 333 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> |
334 | </image> | 334 | </image> |
335 | </images> | 335 | </images> |
336 | <connections> | ||
337 | </connections> | ||
338 | <tabstops> | 336 | <tabstops> |
339 | <tabstop>startButton</tabstop> | 337 | <tabstop>startButton</tabstop> |
340 | <tabstop>stopButton</tabstop> | 338 | <tabstop>stopButton</tabstop> |
341 | <tabstop>refreshButton</tabstop> | 339 | <tabstop>refreshButton</tabstop> |
diff --git a/noncore/net/networksetup/interfaces.cpp b/noncore/net/networksetup/interfaces.cpp index 9155890..377a6db 100644 --- a/noncore/net/networksetup/interfaces.cpp +++ b/noncore/net/networksetup/interfaces.cpp | |||
@@ -50,9 +50,9 @@ Interfaces::Interfaces(QString useInterfacesFile){ | |||
50 | QStringList Interfaces::getInterfaceList(){ | 50 | QStringList Interfaces::getInterfaceList(){ |
51 | QStringList list; | 51 | QStringList list; |
52 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { | 52 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { |
53 | QString line = (*it).simplifyWhiteSpace(); | 53 | QString line = (*it).simplifyWhiteSpace(); |
54 | if(line.contains(IFACE)){ | 54 | if(line.contains(IFACE) && line.at(0) != '#'){ |
55 | line = line.mid(QString(IFACE).length() +1, line.length()); | 55 | line = line.mid(QString(IFACE).length() +1, line.length()); |
56 | line = line.simplifyWhiteSpace(); | 56 | line = line.simplifyWhiteSpace(); |
57 | int findSpace = line.find(" "); | 57 | int findSpace = line.find(" "); |
58 | if( findSpace >= 0){ | 58 | if( findSpace >= 0){ |
@@ -456,9 +456,9 @@ bool Interfaces::setStanza(QString stanza, QString option, QStringList::Iterator | |||
456 | bool found = false; | 456 | bool found = false; |
457 | iterator = interfaces.end(); | 457 | iterator = interfaces.end(); |
458 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { | 458 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { |
459 | QString line = (*it).simplifyWhiteSpace(); | 459 | QString line = (*it).simplifyWhiteSpace(); |
460 | if(line.contains(stanza) && line.contains(option)){ | 460 | if(line.contains(stanza) && line.contains(option) && line.at(0) != '#'){ |
461 | uint point = line.find(option); | 461 | uint point = line.find(option); |
462 | bool valid = true; | 462 | bool valid = true; |
463 | if(point > 0){ | 463 | if(point > 0){ |
464 | // There are more chars in the line. check +1 | 464 | // There are more chars in the line. check +1 |
@@ -502,9 +502,9 @@ bool Interfaces::setOption(QStringList::Iterator start, QString option, QString | |||
502 | } | 502 | } |
503 | found = true; | 503 | found = true; |
504 | break; | 504 | break; |
505 | } | 505 | } |
506 | if((*it).contains(option) && it != start){ | 506 | if((*it).contains(option) && it != start && (*it).at(0) != '#'){ |
507 | // Found it in stanza so replace it. | 507 | // Found it in stanza so replace it. |
508 | if(found) | 508 | if(found) |
509 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); | 509 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); |
510 | found = true; | 510 | found = true; |
@@ -533,9 +533,9 @@ bool Interfaces::removeOption(QStringList::Iterator start, QString option, QStri | |||
533 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | 533 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ |
534 | // got to the end without finding it | 534 | // got to the end without finding it |
535 | break; | 535 | break; |
536 | } | 536 | } |
537 | if((*it).contains(option) && (*it).contains(value) &&it != start){ | 537 | if((*it).contains(option) && (*it).contains(value) && it != start && (*it).at(0) != '#'){ |
538 | // Found it in stanza so replace it. | 538 | // Found it in stanza so replace it. |
539 | if(found) | 539 | if(found) |
540 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); | 540 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); |
541 | found = true; | 541 | found = true; |
@@ -586,9 +586,9 @@ QString Interfaces::getOption(QStringList::Iterator start, QString option, bool | |||
586 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { | 586 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { |
587 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | 587 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ |
588 | break; | 588 | break; |
589 | } | 589 | } |
590 | if((*it).contains(option)){ | 590 | if((*it).contains(option) && (*it).at(0) != '#'){ |
591 | if(found) | 591 | if(found) |
592 | qDebug(QString("Interfaces: Get Options found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1()); | 592 | qDebug(QString("Interfaces: Get Options found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1()); |
593 | found = true; | 593 | found = true; |
594 | QString line = (*it).simplifyWhiteSpace(); | 594 | QString line = (*it).simplifyWhiteSpace(); |
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp index 01063c2..8e4e898 100644 --- a/noncore/net/networksetup/mainwindowimp.cpp +++ b/noncore/net/networksetup/mainwindowimp.cpp | |||
@@ -231,9 +231,9 @@ void MainWindowImp::configureClicked(){ | |||
231 | Interface *i = interfaceItems[item]; | 231 | Interface *i = interfaceItems[item]; |
232 | if(i->getModuleOwner()){ | 232 | if(i->getModuleOwner()){ |
233 | i->getModuleOwner()->setProfile(currentProfile); | 233 | i->getModuleOwner()->setProfile(currentProfile); |
234 | QTabWidget *tabWidget = NULL; | 234 | QTabWidget *tabWidget = NULL; |
235 | QWidget *moduleConfigure = i->getModuleOwner()->configure(&tabWidget); | 235 | QWidget *moduleConfigure = i->getModuleOwner()->configure(i, &tabWidget); |
236 | if(moduleConfigure != NULL){ | 236 | if(moduleConfigure != NULL){ |
237 | if(tabWidget != NULL){ | 237 | if(tabWidget != NULL){ |
238 | InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true); | 238 | InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true); |
239 | configure->setProfile(currentProfile); | 239 | configure->setProfile(currentProfile); |
@@ -277,9 +277,9 @@ void MainWindowImp::informationClicked(){ | |||
277 | } | 277 | } |
278 | 278 | ||
279 | if(i->getModuleOwner()){ | 279 | if(i->getModuleOwner()){ |
280 | QTabWidget *tabWidget = NULL; | 280 | QTabWidget *tabWidget = NULL; |
281 | QWidget *moduleInformation = i->getModuleOwner()->information(&tabWidget); | 281 | QWidget *moduleInformation = i->getModuleOwner()->information(i, &tabWidget); |
282 | if(moduleInformation != NULL){ | 282 | if(moduleInformation != NULL){ |
283 | if(tabWidget != NULL){ | 283 | if(tabWidget != NULL){ |
284 | InterfaceInformationImp *information = new InterfaceInformationImp(tabWidget, "InterfaceSetupImp", i, true); | 284 | InterfaceInformationImp *information = new InterfaceInformationImp(tabWidget, "InterfaceSetupImp", i, true); |
285 | tabWidget->insertTab(information, "TCP/IP"); | 285 | tabWidget->insertTab(information, "TCP/IP"); |
diff --git a/noncore/net/networksetup/module.h b/noncore/net/networksetup/module.h index a30f492..96db5b3 100644 --- a/noncore/net/networksetup/module.h +++ b/noncore/net/networksetup/module.h | |||
@@ -28,9 +28,9 @@ public: | |||
28 | * get the icon name for this device. | 28 | * get the icon name for this device. |
29 | * @param Interface* can be used in determining the icon. | 29 | * @param Interface* can be used in determining the icon. |
30 | * @return QString the icon name (minus .png, .gif etc) | 30 | * @return QString the icon name (minus .png, .gif etc) |
31 | */ | 31 | */ |
32 | virtual QString getPixmapName(Interface* i) = 0; | 32 | virtual QString getPixmapName(Interface *) = 0; |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * Check to see if the interface i is owned by this module. | 35 | * Check to see if the interface i is owned by this module. |
36 | * @param Interface* interface to check against | 36 | * @param Interface* interface to check against |
@@ -39,19 +39,21 @@ public: | |||
39 | virtual bool isOwner(Interface *){ return false; }; | 39 | virtual bool isOwner(Interface *){ return false; }; |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * Create, set tabWiget and return the WLANConfigure Module | 42 | * Create, set tabWiget and return the WLANConfigure Module |
43 | * @param Interface *i the interface to configure. | ||
43 | * @param tabWidget a pointer to the tab widget that this configure has. | 44 | * @param tabWidget a pointer to the tab widget that this configure has. |
44 | * @return QWidget* pointer to the tab widget in this modules configure. | 45 | * @return QWidget* pointer to the tab widget in this modules configure. |
45 | */ | 46 | */ |
46 | virtual QWidget *configure(QTabWidget **){ return NULL; } ; | 47 | virtual QWidget *configure(Interface *, QTabWidget **){ return NULL; } ; |
47 | 48 | ||
48 | /** | 49 | /** |
49 | * Create, set tabWiget and return the Information Module | 50 | * Create, set tabWiget and return the Information Module |
51 | * @param Interface *i the interface to get info on. | ||
50 | * @param tabWidget a pointer to the tab widget that this information has. | 52 | * @param tabWidget a pointer to the tab widget that this information has. |
51 | * @return QWidget* pointer to the tab widget in this modules info. | 53 | * @return QWidget* pointer to the tab widget in this modules info. |
52 | */ | 54 | */ |
53 | virtual QWidget *information(QTabWidget **){ return NULL; }; | 55 | virtual QWidget *information(Interface *, QTabWidget **){ return NULL; }; |
54 | 56 | ||
55 | /** | 57 | /** |
56 | * Get all active (up or down) interfaces | 58 | * Get all active (up or down) interfaces |
57 | * @return QList<Interface> A list of interfaces that exsist that havn't | 59 | * @return QList<Interface> A list of interfaces that exsist that havn't |
diff --git a/noncore/settings/networksettings/interfaceinformation.ui b/noncore/settings/networksettings/interfaceinformation.ui index fc99fce..2838d19 100644 --- a/noncore/settings/networksettings/interfaceinformation.ui +++ b/noncore/settings/networksettings/interfaceinformation.ui | |||
@@ -50,9 +50,9 @@ | |||
50 | <cstring>refreshButton</cstring> | 50 | <cstring>refreshButton</cstring> |
51 | </property> | 51 | </property> |
52 | <property stdset="1"> | 52 | <property stdset="1"> |
53 | <name>text</name> | 53 | <name>text</name> |
54 | <string>Refresh</string> | 54 | <string>&Refresh</string> |
55 | </property> | 55 | </property> |
56 | </widget> | 56 | </widget> |
57 | <widget row="0" column="1" > | 57 | <widget row="0" column="1" > |
58 | <class>QPushButton</class> | 58 | <class>QPushButton</class> |
@@ -61,9 +61,9 @@ | |||
61 | <cstring>stopButton</cstring> | 61 | <cstring>stopButton</cstring> |
62 | </property> | 62 | </property> |
63 | <property stdset="1"> | 63 | <property stdset="1"> |
64 | <name>text</name> | 64 | <name>text</name> |
65 | <string>Stop</string> | 65 | <string>S&top</string> |
66 | </property> | 66 | </property> |
67 | </widget> | 67 | </widget> |
68 | <widget row="1" column="1" > | 68 | <widget row="1" column="1" > |
69 | <class>QPushButton</class> | 69 | <class>QPushButton</class> |
@@ -72,9 +72,9 @@ | |||
72 | <cstring>restartButton</cstring> | 72 | <cstring>restartButton</cstring> |
73 | </property> | 73 | </property> |
74 | <property stdset="1"> | 74 | <property stdset="1"> |
75 | <name>text</name> | 75 | <name>text</name> |
76 | <string>Restart</string> | 76 | <string>R&estart</string> |
77 | </property> | 77 | </property> |
78 | </widget> | 78 | </widget> |
79 | <widget row="0" column="0" > | 79 | <widget row="0" column="0" > |
80 | <class>QPushButton</class> | 80 | <class>QPushButton</class> |
@@ -83,9 +83,9 @@ | |||
83 | <cstring>startButton</cstring> | 83 | <cstring>startButton</cstring> |
84 | </property> | 84 | </property> |
85 | <property stdset="1"> | 85 | <property stdset="1"> |
86 | <name>text</name> | 86 | <name>text</name> |
87 | <string>Start</string> | 87 | <string>&Start</string> |
88 | </property> | 88 | </property> |
89 | </widget> | 89 | </widget> |
90 | </grid> | 90 | </grid> |
91 | </widget> | 91 | </widget> |
@@ -292,9 +292,9 @@ | |||
292 | <cstring>advancedButton</cstring> | 292 | <cstring>advancedButton</cstring> |
293 | </property> | 293 | </property> |
294 | <property stdset="1"> | 294 | <property stdset="1"> |
295 | <name>text</name> | 295 | <name>text</name> |
296 | <string>View Advanced Information</string> | 296 | <string>View &Advanced Information</string> |
297 | </property> | 297 | </property> |
298 | </widget> | 298 | </widget> |
299 | </hbox> | 299 | </hbox> |
300 | </widget> | 300 | </widget> |
@@ -332,10 +332,8 @@ | |||
332 | <name>image0</name> | 332 | <name>image0</name> |
333 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> | 333 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> |
334 | </image> | 334 | </image> |
335 | </images> | 335 | </images> |
336 | <connections> | ||
337 | </connections> | ||
338 | <tabstops> | 336 | <tabstops> |
339 | <tabstop>startButton</tabstop> | 337 | <tabstop>startButton</tabstop> |
340 | <tabstop>stopButton</tabstop> | 338 | <tabstop>stopButton</tabstop> |
341 | <tabstop>refreshButton</tabstop> | 339 | <tabstop>refreshButton</tabstop> |
diff --git a/noncore/settings/networksettings/interfaces.cpp b/noncore/settings/networksettings/interfaces.cpp index 9155890..377a6db 100644 --- a/noncore/settings/networksettings/interfaces.cpp +++ b/noncore/settings/networksettings/interfaces.cpp | |||
@@ -50,9 +50,9 @@ Interfaces::Interfaces(QString useInterfacesFile){ | |||
50 | QStringList Interfaces::getInterfaceList(){ | 50 | QStringList Interfaces::getInterfaceList(){ |
51 | QStringList list; | 51 | QStringList list; |
52 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { | 52 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { |
53 | QString line = (*it).simplifyWhiteSpace(); | 53 | QString line = (*it).simplifyWhiteSpace(); |
54 | if(line.contains(IFACE)){ | 54 | if(line.contains(IFACE) && line.at(0) != '#'){ |
55 | line = line.mid(QString(IFACE).length() +1, line.length()); | 55 | line = line.mid(QString(IFACE).length() +1, line.length()); |
56 | line = line.simplifyWhiteSpace(); | 56 | line = line.simplifyWhiteSpace(); |
57 | int findSpace = line.find(" "); | 57 | int findSpace = line.find(" "); |
58 | if( findSpace >= 0){ | 58 | if( findSpace >= 0){ |
@@ -456,9 +456,9 @@ bool Interfaces::setStanza(QString stanza, QString option, QStringList::Iterator | |||
456 | bool found = false; | 456 | bool found = false; |
457 | iterator = interfaces.end(); | 457 | iterator = interfaces.end(); |
458 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { | 458 | for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { |
459 | QString line = (*it).simplifyWhiteSpace(); | 459 | QString line = (*it).simplifyWhiteSpace(); |
460 | if(line.contains(stanza) && line.contains(option)){ | 460 | if(line.contains(stanza) && line.contains(option) && line.at(0) != '#'){ |
461 | uint point = line.find(option); | 461 | uint point = line.find(option); |
462 | bool valid = true; | 462 | bool valid = true; |
463 | if(point > 0){ | 463 | if(point > 0){ |
464 | // There are more chars in the line. check +1 | 464 | // There are more chars in the line. check +1 |
@@ -502,9 +502,9 @@ bool Interfaces::setOption(QStringList::Iterator start, QString option, QString | |||
502 | } | 502 | } |
503 | found = true; | 503 | found = true; |
504 | break; | 504 | break; |
505 | } | 505 | } |
506 | if((*it).contains(option) && it != start){ | 506 | if((*it).contains(option) && it != start && (*it).at(0) != '#'){ |
507 | // Found it in stanza so replace it. | 507 | // Found it in stanza so replace it. |
508 | if(found) | 508 | if(found) |
509 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); | 509 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); |
510 | found = true; | 510 | found = true; |
@@ -533,9 +533,9 @@ bool Interfaces::removeOption(QStringList::Iterator start, QString option, QStri | |||
533 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | 533 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ |
534 | // got to the end without finding it | 534 | // got to the end without finding it |
535 | break; | 535 | break; |
536 | } | 536 | } |
537 | if((*it).contains(option) && (*it).contains(value) &&it != start){ | 537 | if((*it).contains(option) && (*it).contains(value) && it != start && (*it).at(0) != '#'){ |
538 | // Found it in stanza so replace it. | 538 | // Found it in stanza so replace it. |
539 | if(found) | 539 | if(found) |
540 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); | 540 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); |
541 | found = true; | 541 | found = true; |
@@ -586,9 +586,9 @@ QString Interfaces::getOption(QStringList::Iterator start, QString option, bool | |||
586 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { | 586 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { |
587 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | 587 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ |
588 | break; | 588 | break; |
589 | } | 589 | } |
590 | if((*it).contains(option)){ | 590 | if((*it).contains(option) && (*it).at(0) != '#'){ |
591 | if(found) | 591 | if(found) |
592 | qDebug(QString("Interfaces: Get Options found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1()); | 592 | qDebug(QString("Interfaces: Get Options found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1()); |
593 | found = true; | 593 | found = true; |
594 | QString line = (*it).simplifyWhiteSpace(); | 594 | QString line = (*it).simplifyWhiteSpace(); |
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 01063c2..8e4e898 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -231,9 +231,9 @@ void MainWindowImp::configureClicked(){ | |||
231 | Interface *i = interfaceItems[item]; | 231 | Interface *i = interfaceItems[item]; |
232 | if(i->getModuleOwner()){ | 232 | if(i->getModuleOwner()){ |
233 | i->getModuleOwner()->setProfile(currentProfile); | 233 | i->getModuleOwner()->setProfile(currentProfile); |
234 | QTabWidget *tabWidget = NULL; | 234 | QTabWidget *tabWidget = NULL; |
235 | QWidget *moduleConfigure = i->getModuleOwner()->configure(&tabWidget); | 235 | QWidget *moduleConfigure = i->getModuleOwner()->configure(i, &tabWidget); |
236 | if(moduleConfigure != NULL){ | 236 | if(moduleConfigure != NULL){ |
237 | if(tabWidget != NULL){ | 237 | if(tabWidget != NULL){ |
238 | InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true); | 238 | InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true); |
239 | configure->setProfile(currentProfile); | 239 | configure->setProfile(currentProfile); |
@@ -277,9 +277,9 @@ void MainWindowImp::informationClicked(){ | |||
277 | } | 277 | } |
278 | 278 | ||
279 | if(i->getModuleOwner()){ | 279 | if(i->getModuleOwner()){ |
280 | QTabWidget *tabWidget = NULL; | 280 | QTabWidget *tabWidget = NULL; |
281 | QWidget *moduleInformation = i->getModuleOwner()->information(&tabWidget); | 281 | QWidget *moduleInformation = i->getModuleOwner()->information(i, &tabWidget); |
282 | if(moduleInformation != NULL){ | 282 | if(moduleInformation != NULL){ |
283 | if(tabWidget != NULL){ | 283 | if(tabWidget != NULL){ |
284 | InterfaceInformationImp *information = new InterfaceInformationImp(tabWidget, "InterfaceSetupImp", i, true); | 284 | InterfaceInformationImp *information = new InterfaceInformationImp(tabWidget, "InterfaceSetupImp", i, true); |
285 | tabWidget->insertTab(information, "TCP/IP"); | 285 | tabWidget->insertTab(information, "TCP/IP"); |
diff --git a/noncore/settings/networksettings/module.h b/noncore/settings/networksettings/module.h index a30f492..96db5b3 100644 --- a/noncore/settings/networksettings/module.h +++ b/noncore/settings/networksettings/module.h | |||
@@ -28,9 +28,9 @@ public: | |||
28 | * get the icon name for this device. | 28 | * get the icon name for this device. |
29 | * @param Interface* can be used in determining the icon. | 29 | * @param Interface* can be used in determining the icon. |
30 | * @return QString the icon name (minus .png, .gif etc) | 30 | * @return QString the icon name (minus .png, .gif etc) |
31 | */ | 31 | */ |
32 | virtual QString getPixmapName(Interface* i) = 0; | 32 | virtual QString getPixmapName(Interface *) = 0; |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * Check to see if the interface i is owned by this module. | 35 | * Check to see if the interface i is owned by this module. |
36 | * @param Interface* interface to check against | 36 | * @param Interface* interface to check against |
@@ -39,19 +39,21 @@ public: | |||
39 | virtual bool isOwner(Interface *){ return false; }; | 39 | virtual bool isOwner(Interface *){ return false; }; |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * Create, set tabWiget and return the WLANConfigure Module | 42 | * Create, set tabWiget and return the WLANConfigure Module |
43 | * @param Interface *i the interface to configure. | ||
43 | * @param tabWidget a pointer to the tab widget that this configure has. | 44 | * @param tabWidget a pointer to the tab widget that this configure has. |
44 | * @return QWidget* pointer to the tab widget in this modules configure. | 45 | * @return QWidget* pointer to the tab widget in this modules configure. |
45 | */ | 46 | */ |
46 | virtual QWidget *configure(QTabWidget **){ return NULL; } ; | 47 | virtual QWidget *configure(Interface *, QTabWidget **){ return NULL; } ; |
47 | 48 | ||
48 | /** | 49 | /** |
49 | * Create, set tabWiget and return the Information Module | 50 | * Create, set tabWiget and return the Information Module |
51 | * @param Interface *i the interface to get info on. | ||
50 | * @param tabWidget a pointer to the tab widget that this information has. | 52 | * @param tabWidget a pointer to the tab widget that this information has. |
51 | * @return QWidget* pointer to the tab widget in this modules info. | 53 | * @return QWidget* pointer to the tab widget in this modules info. |
52 | */ | 54 | */ |
53 | virtual QWidget *information(QTabWidget **){ return NULL; }; | 55 | virtual QWidget *information(Interface *, QTabWidget **){ return NULL; }; |
54 | 56 | ||
55 | /** | 57 | /** |
56 | * Get all active (up or down) interfaces | 58 | * Get all active (up or down) interfaces |
57 | * @return QList<Interface> A list of interfaces that exsist that havn't | 59 | * @return QList<Interface> A list of interfaces that exsist that havn't |