author | benmeyer <benmeyer> | 2002-10-18 18:12:53 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-18 18:12:53 (UTC) |
commit | a63b3b36cf4d665b67733e069bfaad8f96388276 (patch) (side-by-side diff) | |
tree | 0089ca8d5bacd31982d8bec367d091b4f58cace1 /noncore/settings/networksettings | |
parent | 5ec0d959ca9d3ade0c7271885028fd4309cf2b4c (diff) | |
download | opie-a63b3b36cf4d665b67733e069bfaad8f96388276.zip opie-a63b3b36cf4d665b67733e069bfaad8f96388276.tar.gz opie-a63b3b36cf4d665b67733e069bfaad8f96388276.tar.bz2 |
interfaces now watches for # in most cases
Diffstat (limited to 'noncore/settings/networksettings') (more/less context) (ignore whitespace changes)
-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 |
4 files changed, 17 insertions, 17 deletions
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 @@ <cstring>refreshButton</cstring> </property> <property stdset="1"> <name>text</name> - <string>Refresh</string> + <string>&Refresh</string> </property> </widget> <widget row="0" column="1" > <class>QPushButton</class> @@ -61,9 +61,9 @@ <cstring>stopButton</cstring> </property> <property stdset="1"> <name>text</name> - <string>Stop</string> + <string>S&top</string> </property> </widget> <widget row="1" column="1" > <class>QPushButton</class> @@ -72,9 +72,9 @@ <cstring>restartButton</cstring> </property> <property stdset="1"> <name>text</name> - <string>Restart</string> + <string>R&estart</string> </property> </widget> <widget row="0" column="0" > <class>QPushButton</class> @@ -83,9 +83,9 @@ <cstring>startButton</cstring> </property> <property stdset="1"> <name>text</name> - <string>Start</string> + <string>&Start</string> </property> </widget> </grid> </widget> @@ -292,9 +292,9 @@ <cstring>advancedButton</cstring> </property> <property stdset="1"> <name>text</name> - <string>View Advanced Information</string> + <string>View &Advanced Information</string> </property> </widget> </hbox> </widget> @@ -332,10 +332,8 @@ <name>image0</name> <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> </image> </images> -<connections> -</connections> <tabstops> <tabstop>startButton</tabstop> <tabstop>stopButton</tabstop> <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){ QStringList Interfaces::getInterfaceList(){ QStringList list; for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { QString line = (*it).simplifyWhiteSpace(); - if(line.contains(IFACE)){ + if(line.contains(IFACE) && line.at(0) != '#'){ line = line.mid(QString(IFACE).length() +1, line.length()); line = line.simplifyWhiteSpace(); int findSpace = line.find(" "); if( findSpace >= 0){ @@ -456,9 +456,9 @@ bool Interfaces::setStanza(QString stanza, QString option, QStringList::Iterator bool found = false; iterator = interfaces.end(); for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { QString line = (*it).simplifyWhiteSpace(); - if(line.contains(stanza) && line.contains(option)){ + if(line.contains(stanza) && line.contains(option) && line.at(0) != '#'){ uint point = line.find(option); bool valid = true; if(point > 0){ // There are more chars in the line. check +1 @@ -502,9 +502,9 @@ bool Interfaces::setOption(QStringList::Iterator start, QString option, QString } found = true; break; } - if((*it).contains(option) && it != start){ + if((*it).contains(option) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. if(found) qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); found = true; @@ -533,9 +533,9 @@ bool Interfaces::removeOption(QStringList::Iterator start, QString option, QStri if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ // got to the end without finding it break; } - if((*it).contains(option) && (*it).contains(value) &&it != start){ + if((*it).contains(option) && (*it).contains(value) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. if(found) qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); found = true; @@ -586,9 +586,9 @@ QString Interfaces::getOption(QStringList::Iterator start, QString option, bool for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ break; } - if((*it).contains(option)){ + if((*it).contains(option) && (*it).at(0) != '#'){ if(found) qDebug(QString("Interfaces: Get Options found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1()); found = true; 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(){ Interface *i = interfaceItems[item];
if(i->getModuleOwner()){
i->getModuleOwner()->setProfile(currentProfile);
QTabWidget *tabWidget = NULL;
- QWidget *moduleConfigure = i->getModuleOwner()->configure(&tabWidget);
+ QWidget *moduleConfigure = i->getModuleOwner()->configure(i, &tabWidget);
if(moduleConfigure != NULL){
if(tabWidget != NULL){
InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true);
configure->setProfile(currentProfile);
@@ -277,9 +277,9 @@ void MainWindowImp::informationClicked(){ }
if(i->getModuleOwner()){
QTabWidget *tabWidget = NULL;
- QWidget *moduleInformation = i->getModuleOwner()->information(&tabWidget);
+ QWidget *moduleInformation = i->getModuleOwner()->information(i, &tabWidget);
if(moduleInformation != NULL){
if(tabWidget != NULL){
InterfaceInformationImp *information = new InterfaceInformationImp(tabWidget, "InterfaceSetupImp", i, true);
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: * get the icon name for this device. * @param Interface* can be used in determining the icon. * @return QString the icon name (minus .png, .gif etc) */ - virtual QString getPixmapName(Interface* i) = 0; + virtual QString getPixmapName(Interface *) = 0; /** * Check to see if the interface i is owned by this module. * @param Interface* interface to check against @@ -39,19 +39,21 @@ public: virtual bool isOwner(Interface *){ return false; }; /** * Create, set tabWiget and return the WLANConfigure Module + * @param Interface *i the interface to configure. * @param tabWidget a pointer to the tab widget that this configure has. * @return QWidget* pointer to the tab widget in this modules configure. */ - virtual QWidget *configure(QTabWidget **){ return NULL; } ; + virtual QWidget *configure(Interface *, QTabWidget **){ return NULL; } ; /** * Create, set tabWiget and return the Information Module + * @param Interface *i the interface to get info on. * @param tabWidget a pointer to the tab widget that this information has. * @return QWidget* pointer to the tab widget in this modules info. */ - virtual QWidget *information(QTabWidget **){ return NULL; }; + virtual QWidget *information(Interface *, QTabWidget **){ return NULL; }; /** * Get all active (up or down) interfaces * @return QList<Interface> A list of interfaces that exsist that havn't |