From 59138f775070440bc3c7ccb2c31f7dea176d54da Mon Sep 17 00:00:00 2001 From: tille Date: Mon, 02 Jun 2003 15:15:18 +0000 Subject: remove item when interface is removed --- (limited to 'noncore') 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 @@ -86,7 +86,7 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par 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 *))); @@ -388,11 +388,10 @@ void MainWindowImp::removeClicked(){ } 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); } } } @@ -405,7 +404,7 @@ void MainWindowImp::removeClicked(){ 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; } -- cgit v0.9.0.2