author | llornkcor <llornkcor> | 2002-04-05 01:34:24 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-05 01:34:24 (UTC) |
commit | dd5bc1f9d61cdd8cfde4c7a7fbba3b53b77b2670 (patch) (side-by-side diff) | |
tree | e8ebf3f926e3ac7e4d612964a05bce834fe6fc2e | |
parent | 8674b15e0768d5108d9a225ff2631538283e1019 (diff) | |
download | opie-dd5bc1f9d61cdd8cfde4c7a7fbba3b53b77b2670.zip opie-dd5bc1f9d61cdd8cfde4c7a7fbba3b53b77b2670.tar.gz opie-dd5bc1f9d61cdd8cfde4c7a7fbba3b53b77b2670.tar.bz2 |
fixed bug where same server was being saved multiple times
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index b451925..919649e 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -116,7 +116,7 @@ OpieFtp::OpieFtp( ) TabWidget = new QTabWidget( this, "TabWidget" ); layout->addMultiCellWidget( TabWidget, 1, 1, 0, 3 ); - TabWidget->setTabShape(QTabWidget::Triangular); +// TabWidget->setTabShape(QTabWidget::Triangular); tab = new QWidget( TabWidget, "tab" ); tabLayout = new QGridLayout( tab ); @@ -267,7 +267,8 @@ OpieFtp::OpieFtp( ) b=FALSE; populateLocalView(); readConfig(); - ServerComboBox->setCurrentItem(currentServerConfig); + ServerComboBox->setCurrentItem(currentServerConfig); + TabWidget->setCurrentPage(2); } @@ -323,9 +324,9 @@ void OpieFtp::newConnection() void OpieFtp::serverComboEdited(const QString & edit) { - if( !edit.isEmpty() ) { + if( ServerComboBox->text(currentServerConfig) != edit /*edit.isEmpty() */) { + qDebug("ServerComboEdited"); currentServerConfig = -1; -// qDebug("comboedited"); } } @@ -523,7 +524,7 @@ bool OpieFtp::remoteChDir(const QString &dir) msg.sprintf(tr("Unable to change directories\n")+dir+"\n%s",FtpLastResponse(conn)); msg.replace(QRegExp(":"),"\n"); QMessageBox::message(tr("Note"),msg); - qDebug(msg); +// qDebug(msg); QCopEnvelope ( "QPE/System", "notBusy()" ); return FALSE; } @@ -667,7 +668,7 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) msg.sprintf(tr("Unable to cd up\n")+"%s",FtpLastResponse(conn)); msg.replace(QRegExp(":"),"\n"); QMessageBox::message(tr("Note"),msg); - qDebug(msg); +// qDebug(msg); } char path[256]; if( FtpPwd( path,sizeof(path),conn) == 0) { //this is easier than fudging the string @@ -675,7 +676,7 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) msg.sprintf(tr("Unable to get working dir\n")+"%s",FtpLastResponse(conn)); msg.replace(QRegExp(":"),"\n"); QMessageBox::message(tr("Note"),msg); - qDebug(msg); +// qDebug(msg); } currentRemoteDir=path; } else { @@ -1065,6 +1066,7 @@ void OpieFtp::readConfig() Config cfg("opieftp"); cfg.setGroup("Server"); currentServerConfig = cfg.readNumEntry("currentServer", -1); +// qDebug("Reading %d", currentServerConfig); serverComboSelected( currentServerConfig); } @@ -1080,7 +1082,6 @@ void OpieFtp::writeConfig() cfg.setGroup("Server"); QString tempStr = cfg.readEntry( temp,""); } - temp.setNum( numberOfEntries + 1); cfg.setGroup("Server"); remoteServerStr = cfg.readEntry( temp,""); |