author | tille <tille> | 2003-06-02 15:15:18 (UTC) |
---|---|---|
committer | tille <tille> | 2003-06-02 15:15:18 (UTC) |
commit | 59138f775070440bc3c7ccb2c31f7dea176d54da (patch) (side-by-side diff) | |
tree | d8b11524a159696851211c690b0611395b96acea /noncore/settings/networksettings | |
parent | 2d9798f244078089a0305d26509e288bb4a4190e (diff) | |
download | opie-59138f775070440bc3c7ccb2c31f7dea176d54da.zip opie-59138f775070440bc3c7ccb2c31f7dea176d54da.tar.gz opie-59138f775070440bc3c7ccb2c31f7dea176d54da.tar.bz2 |
remove item when interface is removed
Diffstat (limited to 'noncore/settings/networksettings') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index abf5663..a0b3113 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp @@ -81,17 +81,17 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it ){ if(it.key() == (*ni)) found = true; } if(!found){ if(!(*ni).contains("_")){ Interface *i = new Interface(this, *ni, false); i->setAttached(false); - i->setHardwareName("Disconnected"); + i->setHardwareName(tr("Disconnected")); interfaceNames.insert(i->getInterfaceName(), i); updateInterface(i); connect(i, SIGNAL(updateInterface(Interface *)), this, SLOT(updateInterface(Interface *))); } } } //getInterfaceList(); @@ -383,34 +383,33 @@ void MainWindowImp::removeClicked(){ } Interface *i = interfaceItems[item]; if(i->getModuleOwner() == NULL){ QMessageBox::information(this, "Can't remove interface.", "Interface is built in.", QMessageBox::Ok); } else{ if(!i->getModuleOwner()->remove(i)) - QMessageBox::information(this, "Error", "Unable to remove.", QMessageBox::Ok); + QMessageBox::information(this, tr("Error"), tr("Unable to remove."), QMessageBox::Ok); else{ - QMessageBox::information(this, "Success", "Interface was removed.", QMessageBox::Ok); - // TODO memory managment.... - // who deletes the interface? + delete item; +// QMessageBox::information(this, "Success", "Interface was removed.", QMessageBox::Ok); } } } /** * 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); + QMessageBox::information(this, tr("Sorry"),tr("Please select an interface first."), QMessageBox::Ok); return; } QString currentProfileText = currentProfileLabel->text(); if(currentProfileText.upper() == "ALL"); currentProfileText = ""; Interface *i = interfaceItems[item]; |