-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 7ca3fff..293c391 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -300,3 +300,3 @@ OpieFtp::OpieFtp( ) | |||
300 | 300 | ||
301 | // fillCombos(); | 301 | fillCombos(); |
302 | 302 | ||
@@ -305,3 +305,5 @@ OpieFtp::OpieFtp( ) | |||
305 | populateLocalView(); | 305 | populateLocalView(); |
306 | readConfig(); | 306 | qDebug("read COnfig"); |
307 | readConfig(); | ||
308 | qDebug("Set current item"); | ||
307 | ServerComboBox->setCurrentItem(currentServerConfig); | 309 | ServerComboBox->setCurrentItem(currentServerConfig); |
@@ -433,3 +435,4 @@ void OpieFtp::connector() | |||
433 | setCaption(ftp_host); | 435 | setCaption(ftp_host); |
434 | writeConfig(); | 436 | if( currentServerConfig == -1) |
437 | writeConfig(); | ||
435 | connectServerBtn->setText( tr("Disconnect")); | 438 | connectServerBtn->setText( tr("Disconnect")); |
@@ -1147,2 +1150,3 @@ void OpieFtp::readConfig() | |||
1147 | currentServerConfig = cfg.readNumEntry("currentServer", -1); | 1150 | currentServerConfig = cfg.readNumEntry("currentServer", -1); |
1151 | |||
1148 | // qDebug("Reading %d", currentServerConfig); | 1152 | // qDebug("Reading %d", currentServerConfig); |
@@ -1172,2 +1176,3 @@ void OpieFtp::writeConfig() | |||
1172 | cfg.writeEntry( temp, ServerComboBox->currentText() +":"+PortSpinBox->cleanText() ); | 1176 | cfg.writeEntry( temp, ServerComboBox->currentText() +":"+PortSpinBox->cleanText() ); |
1177 | cfg.writeEntry("currentServer", numberOfEntries+1); | ||
1173 | cfg.setGroup(temp); | 1178 | cfg.setGroup(temp); |
@@ -1178,2 +1183,3 @@ void OpieFtp::writeConfig() | |||
1178 | cfg.writeEntry("numberOfEntries", QString::number(numberOfEntries + 1 )); | 1183 | cfg.writeEntry("numberOfEntries", QString::number(numberOfEntries + 1 )); |
1184 | |||
1179 | } | 1185 | } |
@@ -1189,4 +1195,6 @@ void OpieFtp::fillCombos() | |||
1189 | temp.setNum(i); | 1195 | temp.setNum(i); |
1196 | qDebug(temp); | ||
1190 | cfg.setGroup("Server"); | 1197 | cfg.setGroup("Server"); |
1191 | remoteServerStr = cfg.readEntry( temp,""); | 1198 | remoteServerStr = cfg.readEntry( temp,""); |
1199 | qDebug( remoteServerStr); | ||
1192 | int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); | 1200 | int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); |
@@ -1197,2 +1205,3 @@ void OpieFtp::fillCombos() | |||
1197 | remoteServerStr = remoteServerStr.left(remoteServerStr.length()-divider); | 1205 | remoteServerStr = remoteServerStr.left(remoteServerStr.length()-divider); |
1206 | qDebug( remoteServerStr); | ||
1198 | ServerComboBox->insertItem( remoteServerStr ); | 1207 | ServerComboBox->insertItem( remoteServerStr ); |
@@ -1225,4 +1234,5 @@ void OpieFtp::serverComboSelected(int index) | |||
1225 | 1234 | ||
1226 | temp.setNum(index+1); | 1235 | temp.setNum(index); |
1227 | remoteServerStr = cfg.readEntry( temp,""); | 1236 | remoteServerStr = cfg.readEntry( temp,""); |
1237 | qDebug("Group" +temp); | ||
1228 | cfg.setGroup(temp); | 1238 | cfg.setGroup(temp); |
@@ -1241,6 +1251,8 @@ void OpieFtp::serverComboSelected(int index) | |||
1241 | UsernameComboBox->lineEdit()->setText(username); | 1251 | UsernameComboBox->lineEdit()->setText(username); |
1242 | 1252 | qDebug(username); | |
1243 | // qDebug("Password is "+cfg.readEntryCrypt(username, "me@opieftp.org")); | 1253 | // qDebug("Password is "+cfg.readEntryCrypt(username, "me@opieftp.org")); |
1244 | PasswordEdit->setText(cfg.readEntryCrypt(username, "me@opieftp.org")); | 1254 | PasswordEdit->setText(cfg.readEntryCrypt(username, "me@opieftp.org")); |
1245 | 1255 | // UsernameComboBox | |
1256 | // PasswordEdit | ||
1257 | |||
1246 | cfg.setGroup("Server"); | 1258 | cfg.setGroup("Server"); |