summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 50131d8..7e24cda 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -182,26 +182,24 @@ void MainWindowImp::getAllInterfaces(){
if((loc = line.find(":")) != -1) {
ifaces += line.left(loc);
}
}
}
for (QStringList::Iterator it = ifaces.begin(); it != ifaces.end(); ++it) {
int flags = 0, family;
Interface *i = NULL;
strcpy(ifr.ifr_name, (*it).latin1());
- qWarning("ifr.ifr_name=%s\n", ifr.ifr_name);
-
struct ifreq ifcopy;
ifcopy = ifr;
result = ioctl(sockfd, SIOCGIFFLAGS, &ifcopy);
flags = ifcopy.ifr_flags;
i = new Interface(this, ifr.ifr_name, false);
i->setAttached(true);
if ((flags & IFF_UP) == IFF_UP)
i->setStatus(true);
else
i->setStatus(false);
if ((flags & IFF_BROADCAST) == IFF_BROADCAST)
@@ -380,37 +378,40 @@ void MainWindowImp::removeClicked(){
/**
* Pull up the configure about the currently selected interface.
* Report an error if no interface is selected.
* If the interface has a module owner then request its configure.
*/
void MainWindowImp::configureClicked(){
QListViewItem *item = connectionList->currentItem();
if(!item){
QMessageBox::information(this, "Sorry","Please select an interface first.", QMessageBox::Ok);
return;
}
+ QString currentProfileText = currentProfileLabel->text();
+ if(currentProfileText.upper() == "ALL");
+ currentProfileText = "";
+
Interface *i = interfaceItems[item];
+
if(i->getModuleOwner()){
QWidget *moduleConfigure = i->getModuleOwner()->configure(i);
if(moduleConfigure != NULL){
+ i->getModuleOwner()->setProfile(currentProfileText);
moduleConfigure->showMaximized();
return;
}
}
InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(this, "InterfaceSetupImp", i, true, Qt::WDestructiveClose );
- QString currentProfileText = currentProfileLabel->text();
- if(currentProfileText.upper() == "ALL");
- currentProfileText = "";
configure->setProfile(currentProfileText);
configure->showMaximized();
}
/**
* Pull up the information about the currently selected interface.
* Report an error if no interface is selected.
* If the interface has a module owner then request its configure.
*/
void MainWindowImp::informationClicked(){
QListViewItem *item = connectionList->currentItem();
if(!item){