-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index d78b7d1..6684abb 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -613,65 +613,65 @@ void OpieFtp::populateLocalView() | |||
613 | fileL.sprintf( "%s",fi->fileName().data() ); | 613 | fileL.sprintf( "%s",fi->fileName().data() ); |
614 | fileDate= fi->lastModified().toString(); | 614 | fileDate= fi->lastModified().toString(); |
615 | if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { | 615 | if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { |
616 | fileL+="/"; | 616 | fileL+="/"; |
617 | isDir=TRUE; | 617 | isDir=TRUE; |
618 | // qDebug( fileL); | 618 | // qDebug( fileL); |
619 | } | 619 | } |
620 | } | 620 | } |
621 | if(fileL !="./" && fi->exists()) { | 621 | if(fileL !="./" && fi->exists()) { |
622 | item= new QListViewItem( Local_View,fileL, fileDate, fileS ); | 622 | item= new QListViewItem( Local_View,fileL, fileDate, fileS ); |
623 | QPixmap pm; | 623 | QPixmap pm; |
624 | 624 | ||
625 | if(isDir || fileL.find("/",0,TRUE) != -1) { | 625 | if(isDir || fileL.find("/",0,TRUE) != -1) { |
626 | if( !QDir( fi->filePath() ).isReadable()) | 626 | if( !QDir( fi->filePath() ).isReadable()) |
627 | pm = Resource::loadPixmap( "lockedfolder" ); | 627 | pm = Resource::loadPixmap( "lockedfolder" ); |
628 | else | 628 | else |
629 | pm= Resource::loadPixmap( "folder" ); | 629 | pm= Resource::loadPixmap( "folder" ); |
630 | item->setPixmap( 0,pm ); | 630 | item->setPixmap( 0,pm ); |
631 | } else { | 631 | } else { |
632 | if( !fi->isReadable() ) | 632 | if( !fi->isReadable() ) |
633 | pm = Resource::loadPixmap( "locked" ); | 633 | pm = Resource::loadPixmap( "locked" ); |
634 | else { | 634 | else { |
635 | MimeType mt(fi->filePath()); | 635 | MimeType mt(fi->filePath()); |
636 | pm=mt.pixmap(); //sets the correct pixmap for mimetype | 636 | pm=mt.pixmap(); //sets the correct pixmap for mimetype |
637 | if(pm.isNull()) | 637 | if(pm.isNull()) |
638 | pm = Resource::loadPixmap( "UnknownDocument-14" ); | 638 | pm = Resource::loadPixmap( "UnknownDocument-14" ); |
639 | item->setPixmap( 0,pm); | 639 | item->setPixmap( 0,pm); |
640 | } | 640 | } |
641 | } | 641 | } |
642 | if( fileL.find("->",0,TRUE) != -1) { | 642 | if( fileL.find("->",0,TRUE) != -1) { |
643 | // overlay link image | 643 | // overlay link image |
644 | pm= Resource::loadPixmap( "folder" ); | 644 | pm= Resource::loadPixmap( "folder" ); |
645 | QPixmap lnk = Resource::loadPixmap( "symlink" ); | 645 | QPixmap lnk = Resource::loadPixmap( "opie/symlink" ); |
646 | QPainter painter( &pm ); | 646 | QPainter painter( &pm ); |
647 | painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); | 647 | painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); |
648 | pm.setMask( pm.createHeuristicMask( FALSE ) ); | 648 | pm.setMask( pm.createHeuristicMask( FALSE ) ); |
649 | item->setPixmap( 0, pm); | 649 | item->setPixmap( 0, pm); |
650 | } | 650 | } |
651 | } | 651 | } |
652 | isDir=FALSE; | 652 | isDir=FALSE; |
653 | ++it; | 653 | ++it; |
654 | } | 654 | } |
655 | Local_View->setSorting( 3,FALSE); | 655 | Local_View->setSorting( 3,FALSE); |
656 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath() ); | 656 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath() ); |
657 | fillCombo( (const QString &)currentDir); | 657 | fillCombo( (const QString &)currentDir); |
658 | } | 658 | } |
659 | 659 | ||
660 | bool OpieFtp::populateRemoteView( ) | 660 | bool OpieFtp::populateRemoteView( ) |
661 | { | 661 | { |
662 | // qDebug("populate remoteview"); | 662 | // qDebug("populate remoteview"); |
663 | QString sfile=QDir::homeDirPath(); | 663 | QString sfile=QDir::homeDirPath(); |
664 | if(sfile.right(1) != "/") | 664 | if(sfile.right(1) != "/") |
665 | sfile+="/._temp"; | 665 | sfile+="/._temp"; |
666 | else | 666 | else |
667 | sfile+="._temp"; | 667 | sfile+="._temp"; |
668 | QFile file( sfile); | 668 | QFile file( sfile); |
669 | Remote_View->clear(); | 669 | Remote_View->clear(); |
670 | QString s, File_Name; | 670 | QString s, File_Name; |
671 | QListViewItem *itemDir=NULL, *itemFile=NULL; | 671 | QListViewItem *itemDir=NULL, *itemFile=NULL; |
672 | QString fileL, fileS, fileDate; | 672 | QString fileL, fileS, fileDate; |
673 | if ( file.open(IO_ReadOnly)) { | 673 | if ( file.open(IO_ReadOnly)) { |
674 | QTextStream t( &file ); // use a text stream | 674 | QTextStream t( &file ); // use a text stream |
675 | while ( !t.eof()) { | 675 | while ( !t.eof()) { |
676 | s = t.readLine(); | 676 | s = t.readLine(); |
677 | fileL = s.right(s.length()-55); | 677 | fileL = s.right(s.length()-55); |