-rw-r--r-- | noncore/tools/remote/configtab.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
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) | |||
102 | if(curr_remote != "") | 102 | if(curr_remote != "") |
103 | remoteSelected(curr_remote); | 103 | remoteSelected(curr_remote); |
104 | } | 104 | } |
105 | /* | ||
106 | void ConfigTab::savePressed() | ||
107 | { | ||
108 | cfg->setGroup(remotes->currentText()); | ||
109 | ButtonDialog *bd = new ButtonDialog(this, "BD", true, 0); | ||
110 | if( bd->exec() == 1) | ||
111 | { | ||
112 | printf("%s\n", bd->getList().join(" ").latin1()); | ||
113 | } | ||
114 | } | ||
115 | */ | ||
116 | 105 | ||
117 | void ConfigTab::newPressed() | 106 | void ConfigTab::newPressed() |
118 | { | 107 | { |
119 | QStringList list; | 108 | QStringList list; |
120 | QString newname = topGroupConf->getRemotesText(); | 109 | QString newname = topGroupConf->getRemotesText(); |
121 | if(newname=="Remotes") | 110 | if(newname.stripWhiteSpace()=="") |
122 | QMessageBox::warning(this, tr("Error"), tr("The name 'Remotes' is not allowed"), QMessageBox::Ok, QMessageBox::NoButton); | 111 | QMessageBox::warning(this, tr("Error"), tr("Please enter a name\nfirst"), QMessageBox::Ok, QMessageBox::NoButton); |
112 | else if(newname=="Remotes") | ||
113 | QMessageBox::warning(this, tr("Error"), tr("The name 'Remotes' is\nnot allowed"), QMessageBox::Ok, QMessageBox::NoButton); | ||
123 | else { | 114 | else { |
124 | cfg->setGroup("Remotes"); | 115 | cfg->setGroup("Remotes"); |
125 | list=cfg->readListEntry("remoteList", ','); | 116 | list=cfg->readListEntry("remoteList", ','); |