From 67b8a6e01fd3e47227f8bafa21077506fa55568c Mon Sep 17 00:00:00 2001 From: paule Date: Sun, 28 Jan 2007 09:02:01 +0000 Subject: Don't allow creating remote layouts with a blank name; remove old commented out code --- (limited to 'noncore') diff --git a/noncore/tools/remote/configtab.cpp b/noncore/tools/remote/configtab.cpp index ebfba2e..af2b5ff 100644 --- a/noncore/tools/remote/configtab.cpp +++ b/noncore/tools/remote/configtab.cpp @@ -102,24 +102,15 @@ void ConfigTab::setConfig(Config *newCfg) if(curr_remote != "") remoteSelected(curr_remote); } -/* -void ConfigTab::savePressed() -{ - cfg->setGroup(remotes->currentText()); - ButtonDialog *bd = new ButtonDialog(this, "BD", true, 0); - if( bd->exec() == 1) - { - printf("%s\n", bd->getList().join(" ").latin1()); - } -} -*/ void ConfigTab::newPressed() { QStringList list; QString newname = topGroupConf->getRemotesText(); - if(newname=="Remotes") - QMessageBox::warning(this, tr("Error"), tr("The name 'Remotes' is not allowed"), QMessageBox::Ok, QMessageBox::NoButton); + if(newname.stripWhiteSpace()=="") + QMessageBox::warning(this, tr("Error"), tr("Please enter a name\nfirst"), QMessageBox::Ok, QMessageBox::NoButton); + else if(newname=="Remotes") + QMessageBox::warning(this, tr("Error"), tr("The name 'Remotes' is\nnot allowed"), QMessageBox::Ok, QMessageBox::NoButton); else { cfg->setGroup("Remotes"); list=cfg->readListEntry("remoteList", ','); -- cgit v0.9.0.2