Diffstat (limited to 'noncore/net/opieftp/opieftp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index a3b29a1..814d706 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -482,17 +482,17 @@ void OpieFtp::populateLocalView() | |||
482 | if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { | 482 | if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { |
483 | fileL+="/"; | 483 | fileL+="/"; |
484 | isDir=TRUE; | 484 | isDir=TRUE; |
485 | // qDebug( fileL); | 485 | // qDebug( fileL); |
486 | } | 486 | } |
487 | } | 487 | } |
488 | if(fileL !="./") { | 488 | if(fileL !="./") { |
489 | item = new QListViewItem( Local_View,fileL,fileS, fileDate); | 489 | item = new QListViewItem( Local_View,fileL,fileS, fileDate); |
490 | if(isDir) | 490 | if(isDir || fileL.find("/",0,TRUE) != -1) |
491 | item->setPixmap( 0, Resource::loadPixmap( "folder" )); | 491 | item->setPixmap( 0, Resource::loadPixmap( "folder" )); |
492 | else | 492 | else |
493 | item->setPixmap( 0, Resource::loadPixmap( "fileopen" )); | 493 | item->setPixmap( 0, Resource::loadPixmap( "fileopen" )); |
494 | } | 494 | } |
495 | isDir=FALSE; | 495 | isDir=FALSE; |
496 | ++it; | 496 | ++it; |
497 | } | 497 | } |
498 | Local_View->setSorting( 3,FALSE); | 498 | Local_View->setSorting( 3,FALSE); |
@@ -522,17 +522,17 @@ bool OpieFtp::populateRemoteView( ) | |||
522 | fileL = fileL+"/"; | 522 | fileL = fileL+"/"; |
523 | // fileL = "/"+fileL+"/"; | 523 | // fileL = "/"+fileL+"/"; |
524 | fileS = s.mid( 30, 42-30); | 524 | fileS = s.mid( 30, 42-30); |
525 | fileS = fileS.stripWhiteSpace(); | 525 | fileS = fileS.stripWhiteSpace(); |
526 | fileDate = s.mid( 42, 55-42); | 526 | fileDate = s.mid( 42, 55-42); |
527 | fileDate = fileDate.stripWhiteSpace(); | 527 | fileDate = fileDate.stripWhiteSpace(); |
528 | if(fileL.find("total",0,TRUE) == -1) { | 528 | if(fileL.find("total",0,TRUE) == -1) { |
529 | QListViewItem * item = new QListViewItem( Remote_View, fileL, fileS, fileDate); | 529 | QListViewItem * item = new QListViewItem( Remote_View, fileL, fileS, fileDate); |
530 | if(s.left(1) == "d") { | 530 | if(s.left(1) == "d" || fileL.find("/",0,TRUE) != -1) { |
531 | item->setPixmap( 0, Resource::loadPixmap( "folder" )); | 531 | item->setPixmap( 0, Resource::loadPixmap( "folder" )); |
532 | if(itemDir) | 532 | if(itemDir) |
533 | item->moveItem(itemDir); | 533 | item->moveItem(itemDir); |
534 | itemDir=item; | 534 | itemDir=item; |
535 | } else { | 535 | } else { |
536 | item->setPixmap( 0, Resource::loadPixmap( "fileopen" )); | 536 | item->setPixmap( 0, Resource::loadPixmap( "fileopen" )); |
537 | if(itemFile) | 537 | if(itemFile) |
538 | item->moveItem(itemFile); | 538 | item->moveItem(itemFile); |
@@ -690,33 +690,33 @@ void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &p | |||
690 | showRemoteMenu(item); | 690 | showRemoteMenu(item); |
691 | break; | 691 | break; |
692 | }; | 692 | }; |
693 | } | 693 | } |
694 | 694 | ||
695 | void OpieFtp::showRemoteMenu(QListViewItem * item) | 695 | void OpieFtp::showRemoteMenu(QListViewItem * item) |
696 | { | 696 | { |
697 | QPopupMenu m;// = new QPopupMenu( Local_View ); | 697 | QPopupMenu m;// = new QPopupMenu( Local_View ); |
698 | if(item->text(0).right(1) == "/") | 698 | if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE)) |
699 | m.insertItem( tr( "Change Directory" ), this, SLOT( doRemoteCd() )); | 699 | m.insertItem( tr( "Change Directory" ), this, SLOT( doRemoteCd() )); |
700 | else | 700 | else |
701 | m.insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); | 701 | m.insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); |
702 | m.insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | 702 | m.insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); |
703 | m.insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); | 703 | m.insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); |
704 | m.insertSeparator(); | 704 | m.insertSeparator(); |
705 | m.insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); | 705 | m.insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); |
706 | m.exec( QCursor::pos() ); | 706 | m.exec( QCursor::pos() ); |
707 | } | 707 | } |
708 | 708 | ||
709 | void OpieFtp::showLocalMenu(QListViewItem * item) | 709 | void OpieFtp::showLocalMenu(QListViewItem * item) |
710 | { | 710 | { |
711 | QPopupMenu m; | 711 | QPopupMenu m; |
712 | m.insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | 712 | m.insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); |
713 | m.insertSeparator(); | 713 | m.insertSeparator(); |
714 | if(item->text(0).right(1) == "/") | 714 | if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE)) |
715 | m.insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); | 715 | m.insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); |
716 | else | 716 | else |
717 | m.insertItem( tr( "Upload" ), this, SLOT( localUpload() )); | 717 | m.insertItem( tr( "Upload" ), this, SLOT( localUpload() )); |
718 | m.insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | 718 | m.insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); |
719 | m.insertItem( tr( "Rename" ), this, SLOT( localRename() )); | 719 | m.insertItem( tr( "Rename" ), this, SLOT( localRename() )); |
720 | m.insertSeparator(); | 720 | m.insertSeparator(); |
721 | m.insertItem( tr( "Delete" ), this, SLOT( localDelete() )); | 721 | m.insertItem( tr( "Delete" ), this, SLOT( localDelete() )); |
722 | m.setCheckable(TRUE); | 722 | m.setCheckable(TRUE); |