-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index f70011b..f1b159c 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -666,81 +666,81 @@ void OpieFtp::showHidden() | |||
666 | localMenu->setItemChecked(localMenu->idAt(0),FALSE); | 666 | localMenu->setItemChecked(localMenu->idAt(0),FALSE); |
667 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 667 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
668 | b=FALSE; | 668 | b=FALSE; |
669 | } | 669 | } |
670 | populateLocalView(); | 670 | populateLocalView(); |
671 | } | 671 | } |
672 | 672 | ||
673 | void OpieFtp::ListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) | 673 | void OpieFtp::ListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) |
674 | { | 674 | { |
675 | switch (mouse) { | 675 | switch (mouse) { |
676 | case 1: | 676 | case 1: |
677 | break; | 677 | break; |
678 | case 2: | 678 | case 2: |
679 | showLocalMenu(item); | 679 | showLocalMenu(item); |
680 | break; | 680 | break; |
681 | }; | 681 | }; |
682 | } | 682 | } |
683 | 683 | ||
684 | void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) | 684 | void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) |
685 | { | 685 | { |
686 | switch (mouse) { | 686 | switch (mouse) { |
687 | case 1: | 687 | case 1: |
688 | break; | 688 | break; |
689 | case 2: | 689 | case 2: |
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) == "/" ||*/ item->text(0).find("/",0,TRUE)) | 698 | if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) != -1) |
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) == "/" ||*/ item->text(0).find("/",0,TRUE)) | 714 | if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) !=-1) |
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); |
723 | if (b) | 723 | if (b) |
724 | m.setItemChecked(m.idAt(0),TRUE); | 724 | m.setItemChecked(m.idAt(0),TRUE); |
725 | else | 725 | else |
726 | m.setItemChecked(m.idAt(0),FALSE); | 726 | m.setItemChecked(m.idAt(0),FALSE); |
727 | 727 | ||
728 | m.exec( QCursor::pos() ); | 728 | m.exec( QCursor::pos() ); |
729 | } | 729 | } |
730 | 730 | ||
731 | void OpieFtp::localMakDir() | 731 | void OpieFtp::localMakDir() |
732 | { | 732 | { |
733 | InputDialog *fileDlg; | 733 | InputDialog *fileDlg; |
734 | fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0); | 734 | fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0); |
735 | fileDlg->exec(); | 735 | fileDlg->exec(); |
736 | if( fileDlg->result() == 1 ) { | 736 | if( fileDlg->result() == 1 ) { |
737 | QString filename = fileDlg->LineEdit1->text(); | 737 | QString filename = fileDlg->LineEdit1->text(); |
738 | currentDir.mkdir( currentDir.canonicalPath()+"/"+filename); | 738 | currentDir.mkdir( currentDir.canonicalPath()+"/"+filename); |
739 | } | 739 | } |
740 | populateLocalView(); | 740 | populateLocalView(); |
741 | } | 741 | } |
742 | 742 | ||
743 | void OpieFtp::localDelete() | 743 | void OpieFtp::localDelete() |
744 | { | 744 | { |
745 | QString f = Local_View->currentItem()->text(0); | 745 | QString f = Local_View->currentItem()->text(0); |
746 | if(QDir(f).exists() ) { | 746 | if(QDir(f).exists() ) { |