summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -46,50 +46,50 @@
<widget row="1" column="0" >
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>refreshButton</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Refresh</string>
+ <string>&amp;Refresh</string>
</property>
</widget>
<widget row="0" column="1" >
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>stopButton</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Stop</string>
+ <string>S&amp;top</string>
</property>
</widget>
<widget row="1" column="1" >
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>restartButton</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Restart</string>
+ <string>R&amp;estart</string>
</property>
</widget>
<widget row="0" column="0" >
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>startButton</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Start</string>
+ <string>&amp;Start</string>
</property>
</widget>
</grid>
</widget>
<widget row="0" column="0" >
<class>Line</class>
<property stdset="1">
<name>name</name>
@@ -288,17 +288,17 @@
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>advancedButton</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>View Advanced Information</string>
+ <string>View &amp;Advanced Information</string>
</property>
</widget>
</hbox>
</widget>
<widget row="5" column="0" rowspan="1" colspan="2" >
<class>Line</class>
<property stdset="1">
<name>name</name>
@@ -328,18 +328,16 @@
</customwidget>
</customwidgets>
<images>
<image>
<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>
<tabstop>restartButton</tabstop>
<tabstop>advancedButton</tabstop>
</tabstops>
</UI>
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
@@ -46,17 +46,17 @@ Interfaces::Interfaces(QString useInterfacesFile){
* hardware that is not currently connected such as an 802.11b card
* not plugged in, but configured for when it is plugged in.
* @return Return string list of interfaces.
**/
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){
line = line.mid(0, findSpace);
list.append(line);
}
}
@@ -452,17 +452,17 @@ QString Interfaces::getScript(bool &error){
* @param interator interator to place at location of stanza if successfull.
* @return bool true if the stanza is found.
*/
bool Interfaces::setStanza(QString stanza, QString option, QStringList::Iterator &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
if(line.at(point-1) != ' ')
valid = false;
}
point += option.length();
@@ -498,17 +498,17 @@ bool Interfaces::setOption(QStringList::Iterator start, QString option, QString
if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){
if(!found && value != ""){
// Got to the end of the stanza without finding it, so append it.
interfaces.insert(--it, QString("\t%1 %2").arg(option).arg(value));
}
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;
(*it) = QString("\t%1 %2").arg(option).arg(value);
}
}
if(!found){
@@ -529,17 +529,17 @@ bool Interfaces::removeOption(QStringList::Iterator start, QString option, QStri
return false;
bool found = false;
for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) {
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;
(*it) = "";
}
}
return found;
@@ -582,17 +582,17 @@ QString Interfaces::getOption(QStringList::Iterator start, QString option, bool
}
QString value;
bool found = false;
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();
int space = line.find(" ", option.length());
if(space != -1)
value = line.mid(space+1, line.length());
else
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
@@ -227,17 +227,17 @@ void MainWindowImp::configureClicked(){
if(profilesList->count() <= 1 || currentProfile == "All"){
currentProfile = "";
}
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);
tabWidget->insertTab(configure, "TCP/IP");
}
moduleConfigure->showMaximized();
@@ -273,17 +273,17 @@ void MainWindowImp::informationClicked(){
QStringList list;
for(uint i = 0; i < profilesList->count(); i++){
list.append(profilesList->text(i));
}
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");
}
moduleInformation->showMaximized();
moduleInformation->show();
return;
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
@@ -24,38 +24,40 @@ public:
*/
virtual void setProfile(QString newProfile) = 0;
/**
* 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
* @return bool true if i is owned by this module, false otherwise.
*/
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
* been called by isOwner()
*/
virtual QList<Interface> getInterfaces() = 0;
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
@@ -46,50 +46,50 @@
<widget row="1" column="0" >
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>refreshButton</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Refresh</string>
+ <string>&amp;Refresh</string>
</property>
</widget>
<widget row="0" column="1" >
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>stopButton</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Stop</string>
+ <string>S&amp;top</string>
</property>
</widget>
<widget row="1" column="1" >
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>restartButton</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Restart</string>
+ <string>R&amp;estart</string>
</property>
</widget>
<widget row="0" column="0" >
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>startButton</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Start</string>
+ <string>&amp;Start</string>
</property>
</widget>
</grid>
</widget>
<widget row="0" column="0" >
<class>Line</class>
<property stdset="1">
<name>name</name>
@@ -288,17 +288,17 @@
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>advancedButton</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>View Advanced Information</string>
+ <string>View &amp;Advanced Information</string>
</property>
</widget>
</hbox>
</widget>
<widget row="5" column="0" rowspan="1" colspan="2" >
<class>Line</class>
<property stdset="1">
<name>name</name>
@@ -328,18 +328,16 @@
</customwidget>
</customwidgets>
<images>
<image>
<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>
<tabstop>restartButton</tabstop>
<tabstop>advancedButton</tabstop>
</tabstops>
</UI>
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
@@ -46,17 +46,17 @@ Interfaces::Interfaces(QString useInterfacesFile){
* hardware that is not currently connected such as an 802.11b card
* not plugged in, but configured for when it is plugged in.
* @return Return string list of interfaces.
**/
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){
line = line.mid(0, findSpace);
list.append(line);
}
}
@@ -452,17 +452,17 @@ QString Interfaces::getScript(bool &error){
* @param interator interator to place at location of stanza if successfull.
* @return bool true if the stanza is found.
*/
bool Interfaces::setStanza(QString stanza, QString option, QStringList::Iterator &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
if(line.at(point-1) != ' ')
valid = false;
}
point += option.length();
@@ -498,17 +498,17 @@ bool Interfaces::setOption(QStringList::Iterator start, QString option, QString
if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){
if(!found && value != ""){
// Got to the end of the stanza without finding it, so append it.
interfaces.insert(--it, QString("\t%1 %2").arg(option).arg(value));
}
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;
(*it) = QString("\t%1 %2").arg(option).arg(value);
}
}
if(!found){
@@ -529,17 +529,17 @@ bool Interfaces::removeOption(QStringList::Iterator start, QString option, QStri
return false;
bool found = false;
for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) {
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;
(*it) = "";
}
}
return found;
@@ -582,17 +582,17 @@ QString Interfaces::getOption(QStringList::Iterator start, QString option, bool
}
QString value;
bool found = false;
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();
int space = line.find(" ", option.length());
if(space != -1)
value = line.mid(space+1, line.length());
else
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
@@ -227,17 +227,17 @@ void MainWindowImp::configureClicked(){
if(profilesList->count() <= 1 || currentProfile == "All"){
currentProfile = "";
}
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);
tabWidget->insertTab(configure, "TCP/IP");
}
moduleConfigure->showMaximized();
@@ -273,17 +273,17 @@ void MainWindowImp::informationClicked(){
QStringList list;
for(uint i = 0; i < profilesList->count(); i++){
list.append(profilesList->text(i));
}
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");
}
moduleInformation->showMaximized();
moduleInformation->show();
return;
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
@@ -24,38 +24,40 @@ public:
*/
virtual void setProfile(QString newProfile) = 0;
/**
* 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
* @return bool true if i is owned by this module, false otherwise.
*/
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
* been called by isOwner()
*/
virtual QList<Interface> getInterfaces() = 0;