summaryrefslogtreecommitdiff
path: root/noncore
authorbenmeyer <benmeyer>2002-10-18 18:12:53 (UTC)
committer benmeyer <benmeyer>2002-10-18 18:12:53 (UTC)
commita63b3b36cf4d665b67733e069bfaad8f96388276 (patch) (side-by-side diff)
tree0089ca8d5bacd31982d8bec367d091b4f58cace1 /noncore
parent5ec0d959ca9d3ade0c7271885028fd4309cf2b4c (diff)
downloadopie-a63b3b36cf4d665b67733e069bfaad8f96388276.zip
opie-a63b3b36cf4d665b67733e069bfaad8f96388276.tar.gz
opie-a63b3b36cf4d665b67733e069bfaad8f96388276.tar.bz2
interfaces now watches for # in most cases
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/interfaceinformation.ui12
-rw-r--r--noncore/net/networksetup/interfaces.cpp10
-rw-r--r--noncore/net/networksetup/mainwindowimp.cpp4
-rw-r--r--noncore/net/networksetup/module.h8
-rw-r--r--noncore/settings/networksettings/interfaceinformation.ui12
-rw-r--r--noncore/settings/networksettings/interfaces.cpp10
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp4
-rw-r--r--noncore/settings/networksettings/module.h8
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
@@ -51,7 +51,7 @@
</property>
<property stdset="1">
<name>text</name>
- <string>Refresh</string>
+ <string>&amp;Refresh</string>
</property>
</widget>
<widget row="0" column="1" >
@@ -62,7 +62,7 @@
</property>
<property stdset="1">
<name>text</name>
- <string>Stop</string>
+ <string>S&amp;top</string>
</property>
</widget>
<widget row="1" column="1" >
@@ -73,7 +73,7 @@
</property>
<property stdset="1">
<name>text</name>
- <string>Restart</string>
+ <string>R&amp;estart</string>
</property>
</widget>
<widget row="0" column="0" >
@@ -84,7 +84,7 @@
</property>
<property stdset="1">
<name>text</name>
- <string>Start</string>
+ <string>&amp;Start</string>
</property>
</widget>
</grid>
@@ -293,7 +293,7 @@
</property>
<property stdset="1">
<name>text</name>
- <string>View Advanced Information</string>
+ <string>View &amp;Advanced Information</string>
</property>
</widget>
</hbox>
@@ -333,8 +333,6 @@
<data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
</image>
</images>
-<connections>
-</connections>
<tabstops>
<tabstop>startButton</tabstop>
<tabstop>stopButton</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
@@ -51,7 +51,7 @@ 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(" ");
@@ -457,7 +457,7 @@ bool Interfaces::setStanza(QString stanza, QString option, QStringList::Iterator
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){
@@ -503,7 +503,7 @@ 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());
@@ -534,7 +534,7 @@ bool Interfaces::removeOption(QStringList::Iterator start, QString option, QStri
// 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());
@@ -587,7 +587,7 @@ QString Interfaces::getOption(QStringList::Iterator start, QString option, bool
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;
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
@@ -232,7 +232,7 @@ void MainWindowImp::configureClicked(){
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);
@@ -278,7 +278,7 @@ 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);
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
@@ -29,7 +29,7 @@ public:
* @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.
@@ -40,17 +40,19 @@ public:
/**
* 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
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
@@ -51,7 +51,7 @@
</property>
<property stdset="1">
<name>text</name>
- <string>Refresh</string>
+ <string>&amp;Refresh</string>
</property>
</widget>
<widget row="0" column="1" >
@@ -62,7 +62,7 @@
</property>
<property stdset="1">
<name>text</name>
- <string>Stop</string>
+ <string>S&amp;top</string>
</property>
</widget>
<widget row="1" column="1" >
@@ -73,7 +73,7 @@
</property>
<property stdset="1">
<name>text</name>
- <string>Restart</string>
+ <string>R&amp;estart</string>
</property>
</widget>
<widget row="0" column="0" >
@@ -84,7 +84,7 @@
</property>
<property stdset="1">
<name>text</name>
- <string>Start</string>
+ <string>&amp;Start</string>
</property>
</widget>
</grid>
@@ -293,7 +293,7 @@
</property>
<property stdset="1">
<name>text</name>
- <string>View Advanced Information</string>
+ <string>View &amp;Advanced Information</string>
</property>
</widget>
</hbox>
@@ -333,8 +333,6 @@
<data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
</image>
</images>
-<connections>
-</connections>
<tabstops>
<tabstop>startButton</tabstop>
<tabstop>stopButton</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
@@ -51,7 +51,7 @@ 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(" ");
@@ -457,7 +457,7 @@ bool Interfaces::setStanza(QString stanza, QString option, QStringList::Iterator
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){
@@ -503,7 +503,7 @@ 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());
@@ -534,7 +534,7 @@ bool Interfaces::removeOption(QStringList::Iterator start, QString option, QStri
// 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());
@@ -587,7 +587,7 @@ QString Interfaces::getOption(QStringList::Iterator start, QString option, bool
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;
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
@@ -232,7 +232,7 @@ void MainWindowImp::configureClicked(){
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);
@@ -278,7 +278,7 @@ 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);
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
@@ -29,7 +29,7 @@ public:
* @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.
@@ -40,17 +40,19 @@ public:
/**
* 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