-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 3dda17e..e64fd73 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -134,5 +134,6 @@ OpieFtp::OpieFtp( ) Local_View->setMultiSelection( TRUE ); Local_View->setSelectionMode(QListView::Extended); - QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); + + QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); tabLayout->addWidget( Local_View, 0, 0 ); @@ -319,5 +320,4 @@ void OpieFtp::newConnection() PortSpinBox->setValue( 21); TabWidget->setCurrentPage(2); - currentServerConfig = -1; } @@ -433,6 +433,6 @@ void OpieFtp::localUpload() ProgressBar->reset(); nullifyCallBack(); - it.current()->setSelected(FALSE); } //end currentSelected + it.current()->setSelected(FALSE); } TabWidget->setCurrentPage(1); @@ -487,6 +487,6 @@ void OpieFtp::remoteDownload() ProgressBar->reset(); nullifyCallBack(); - it.current()->setSelected(FALSE); } + it.current()->setSelected(FALSE); } TabWidget->setCurrentPage(0); @@ -658,5 +658,5 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) { if( selectedItem) { - QCopEnvelope ( "QPE/System", "busy()" ); +// QCopEnvelope ( "QPE/System", "busy()" ); QString oldRemoteCurrentDir = currentRemoteDir; QString strItem=selectedItem->text(0); @@ -687,12 +687,11 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) currentRemoteDir = oldRemoteCurrentDir; strItem=""; - qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); +// qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); } } else if(strItem.find("/",0,TRUE) != -1) { // this is a directory - qDebug("trying directory"); if( !remoteChDir( (const QString &)currentRemoteDir + strItem)) { currentRemoteDir = oldRemoteCurrentDir; strItem=""; - qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); +// qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); } else { @@ -700,5 +699,6 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) } } else { - qDebug("download "+strItem); + QCopEnvelope ( "QPE/System", "notBusy()" ); + return; } } @@ -706,7 +706,7 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) if(currentRemoteDir.right(1) !="/") currentRemoteDir +="/"; - currentPathCombo->lineEdit()->setText( currentRemoteDir ); - fillRemoteCombo( (const QString &)currentDir); - QCopEnvelope ( "QPE/System", "notBusy()" ); + currentPathCombo->lineEdit()->setText( currentRemoteDir); + fillRemoteCombo( (const QString &)currentRemoteDir); +// QCopEnvelope ( "QPE/System", "notBusy()" ); } } @@ -728,4 +728,5 @@ void OpieFtp::localListClicked(QListViewItem *selectedItem) } else { // not a symlink if(strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) { + if(QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem)).exists() ) { strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem); @@ -744,4 +745,5 @@ void OpieFtp::localListClicked(QListViewItem *selectedItem) if( QFile::exists(strItem ) ) { // qDebug("upload "+strItem); + return; } } //end not symlink @@ -1069,5 +1071,4 @@ void OpieFtp::readConfig() void OpieFtp::writeConfig() { - Config cfg("opieftp"); cfg.setGroup("Server"); @@ -1075,4 +1076,9 @@ void OpieFtp::writeConfig() int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); if( currentServerConfig == -1) { + for (int i = 1; i <= numberOfEntries; i++) { + temp.setNum(i); + cfg.setGroup("Server"); + QString tempStr = cfg.readEntry( temp,""); + } temp.setNum( numberOfEntries + 1); @@ -1091,5 +1097,4 @@ void OpieFtp::writeConfig() cfg.setGroup("Server"); cfg.writeEntry("numberOfEntries", QString::number(numberOfEntries + 1 )); - } } |