-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index fd6b028..907a812 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -127,3 +127,3 @@ OpieFtp::OpieFtp( ) | |||
127 | // Local_View->setResizePolicy( QListView::AutoOneFit ); | 127 | // Local_View->setResizePolicy( QListView::AutoOneFit ); |
128 | Local_View->addColumn( tr("File"),120); | 128 | Local_View->addColumn( tr("File"),150); |
129 | Local_View->addColumn( tr("Size"),-1); | 129 | Local_View->addColumn( tr("Size"),-1); |
@@ -133,2 +133,4 @@ OpieFtp::OpieFtp( ) | |||
133 | Local_View->setAllColumnsShowFocus(TRUE); | 133 | Local_View->setAllColumnsShowFocus(TRUE); |
134 | Local_View->setMultiSelection( TRUE ); | ||
135 | |||
134 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); | 136 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); |
@@ -137,3 +139,3 @@ OpieFtp::OpieFtp( ) | |||
137 | 139 | ||
138 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), | 140 | connect( Local_View, SIGNAL( doubleClicked( QListViewItem*)), |
139 | this,SLOT( localListClicked(QListViewItem *)) ); | 141 | this,SLOT( localListClicked(QListViewItem *)) ); |
@@ -150,3 +152,3 @@ OpieFtp::OpieFtp( ) | |||
150 | Remote_View = new QListView( tab_2, "Remote_View" ); | 152 | Remote_View = new QListView( tab_2, "Remote_View" ); |
151 | Remote_View->addColumn( tr("File"),120); | 153 | Remote_View->addColumn( tr("File"),150); |
152 | Remote_View->addColumn( tr("Size"),-1); | 154 | Remote_View->addColumn( tr("Size"),-1); |
@@ -158,5 +160,7 @@ OpieFtp::OpieFtp( ) | |||
158 | Remote_View->setAllColumnsShowFocus(TRUE); | 160 | Remote_View->setAllColumnsShowFocus(TRUE); |
161 | Remote_View->setMultiSelection( TRUE ); | ||
162 | |||
159 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); | 163 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); |
160 | 164 | ||
161 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), | 165 | connect( Remote_View, SIGNAL( doubleClicked( QListViewItem*)), |
162 | this,SLOT( remoteListClicked(QListViewItem *)) ); | 166 | this,SLOT( remoteListClicked(QListViewItem *)) ); |
@@ -409,3 +413,7 @@ void OpieFtp::localUpload() | |||
409 | // qApp->processEvents(); | 413 | // qApp->processEvents(); |
410 | QString strItem = Local_View->currentItem()->text(0); | 414 | QList<QListViewItem> * getSelectedItems( QListView * Local_View ); |
415 | QListViewItemIterator it( Local_View ); | ||
416 | for ( ; it.current(); ++it ) { | ||
417 | if ( it.current()->isSelected() ) { | ||
418 | QString strItem = it.current()->text(0); | ||
411 | QString localFile = currentDir.canonicalPath()+"/"+strItem; | 419 | QString localFile = currentDir.canonicalPath()+"/"+strItem; |
@@ -429,4 +437,2 @@ void OpieFtp::localUpload() | |||
429 | } | 437 | } |
430 | ProgressBar->reset(); | ||
431 | nullifyCallBack(); | ||
432 | } else { | 438 | } else { |
@@ -434,2 +440,7 @@ void OpieFtp::localUpload() | |||
434 | } | 440 | } |
441 | ProgressBar->reset(); | ||
442 | nullifyCallBack(); | ||
443 | it.current()->setSelected(FALSE); | ||
444 | } //end currentSelected | ||
445 | } | ||
435 | TabWidget->setCurrentPage(1); | 446 | TabWidget->setCurrentPage(1); |
@@ -445,3 +456,2 @@ void OpieFtp::nullifyCallBack() | |||
445 | FtpOptions(FTPLIB_CALLBACKBYTES, NULL, conn); | 456 | FtpOptions(FTPLIB_CALLBACKBYTES, NULL, conn); |
446 | |||
447 | } | 457 | } |
@@ -453,5 +463,9 @@ void OpieFtp::remoteDownload() | |||
453 | QCopEnvelope ( "QPE/System", "busy()" ); | 463 | QCopEnvelope ( "QPE/System", "busy()" ); |
454 | QString strItem = Remote_View->currentItem()->text(0); | ||
455 | // strItem=strItem.right(strItem.length()-1); | ||
456 | 464 | ||
465 | QList<QListViewItem> * getSelectedItems( QListView * Remote_View ); | ||
466 | QListViewItemIterator it( Remote_View ); | ||
467 | for ( ; it.current(); ++it ) { | ||
468 | if ( it.current()->isSelected() ) { | ||
469 | QString strItem = it.current()->text(0); | ||
470 | // strItem=strItem.right(strItem.length()-1); | ||
457 | QString localFile = currentDir.canonicalPath(); | 471 | QString localFile = currentDir.canonicalPath(); |
@@ -482,2 +496,5 @@ void OpieFtp::remoteDownload() | |||
482 | nullifyCallBack(); | 496 | nullifyCallBack(); |
497 | it.current()->setSelected(FALSE); | ||
498 | } | ||
499 | } | ||
483 | TabWidget->setCurrentPage(0); | 500 | TabWidget->setCurrentPage(0); |
@@ -569,3 +586,3 @@ void OpieFtp::populateLocalView() | |||
569 | MimeType mt(fi->filePath()); | 586 | MimeType mt(fi->filePath()); |
570 | pm=mt.pixmap(); | 587 | pm=mt.pixmap(); //sets the correct pixmap for mimetype |
571 | if(pm.isNull()) | 588 | if(pm.isNull()) |
@@ -591,3 +608,2 @@ void OpieFtp::populateLocalView() | |||
591 | fillCombo( (const QString &)currentDir); | 608 | fillCombo( (const QString &)currentDir); |
592 | |||
593 | } | 609 | } |
@@ -913,3 +929,2 @@ void OpieFtp::remoteDelete() | |||
913 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate | 929 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate |
914 | |||
915 | } | 930 | } |