-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 6d0be57..0b88a35 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -737,275 +737,277 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) | |||
737 | } | 737 | } |
738 | currentRemoteDir=path; | 738 | currentRemoteDir=path; |
739 | } else { | 739 | } else { |
740 | if(strItem.find("->",0,TRUE) != -1) { //symlink on some servers | 740 | if(strItem.find("->",0,TRUE) != -1) { //symlink on some servers |
741 | strItem=strItem.right( strItem.length() - strItem.find("->",0,TRUE) - 2 ); | 741 | strItem=strItem.right( strItem.length() - strItem.find("->",0,TRUE) - 2 ); |
742 | strItem = strItem.stripWhiteSpace(); | 742 | strItem = strItem.stripWhiteSpace(); |
743 | currentRemoteDir = strItem; | 743 | currentRemoteDir = strItem; |
744 | if( !remoteChDir( (const QString &)strItem)) { | 744 | if( !remoteChDir( (const QString &)strItem)) { |
745 | currentRemoteDir = oldRemoteCurrentDir; | 745 | currentRemoteDir = oldRemoteCurrentDir; |
746 | strItem=""; | 746 | strItem=""; |
747 | // qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); | 747 | // qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); |
748 | } | 748 | } |
749 | } else if(strItem.find("/",0,TRUE) != -1) { // this is a directory | 749 | } else if(strItem.find("/",0,TRUE) != -1) { // this is a directory |
750 | if( !remoteChDir( (const QString &)currentRemoteDir + strItem)) { | 750 | if( !remoteChDir( (const QString &)currentRemoteDir + strItem)) { |
751 | currentRemoteDir = oldRemoteCurrentDir; | 751 | currentRemoteDir = oldRemoteCurrentDir; |
752 | strItem=""; | 752 | strItem=""; |
753 | // qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); | 753 | // qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); |
754 | 754 | ||
755 | } else { | 755 | } else { |
756 | currentRemoteDir = currentRemoteDir+strItem; | 756 | currentRemoteDir = currentRemoteDir+strItem; |
757 | } | 757 | } |
758 | } else { | 758 | } else { |
759 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 759 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
760 | return; | 760 | return; |
761 | } | 761 | } |
762 | } | 762 | } |
763 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate | 763 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate |
764 | if(currentRemoteDir.right(1) !="/") | 764 | if(currentRemoteDir.right(1) !="/") |
765 | currentRemoteDir +="/"; | 765 | currentRemoteDir +="/"; |
766 | currentPathCombo->lineEdit()->setText( currentRemoteDir); | 766 | currentPathCombo->lineEdit()->setText( currentRemoteDir); |
767 | fillRemoteCombo( (const QString &)currentRemoteDir); | 767 | fillRemoteCombo( (const QString &)currentRemoteDir); |
768 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 768 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
769 | } | 769 | } |
770 | } | 770 | } |
771 | 771 | ||
772 | void OpieFtp::localListClicked(QListViewItem *selectedItem) | 772 | void OpieFtp::localListClicked(QListViewItem *selectedItem) |
773 | { | 773 | { |
774 | if(selectedItem!= NULL) { | 774 | if(selectedItem!= NULL) { |
775 | 775 | ||
776 | QString strItem=selectedItem->text(0); | 776 | QString strItem=selectedItem->text(0); |
777 | QString strSize=selectedItem->text(1); | 777 | QString strSize=selectedItem->text(1); |
778 | strSize=strSize.stripWhiteSpace(); | 778 | strSize=strSize.stripWhiteSpace(); |
779 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink | 779 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink |
780 | // is symlink | 780 | // is symlink |
781 | QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); | 781 | QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); |
782 | if(QDir(strItem2).exists() ) { | 782 | if(QDir(strItem2).exists() ) { |
783 | currentDir.cd(strItem2, TRUE); | 783 | currentDir.cd(strItem2, TRUE); |
784 | populateLocalView(); | 784 | populateLocalView(); |
785 | } | 785 | } |
786 | } else { // not a symlink | 786 | } else { // not a symlink |
787 | if(strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) { | 787 | if(strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) { |
788 | 788 | ||
789 | if(QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem)).exists() ) { | 789 | if(QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem)).exists() ) { |
790 | strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem); | 790 | strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem); |
791 | currentDir.cd(strItem,FALSE); | 791 | currentDir.cd(strItem,FALSE); |
792 | populateLocalView(); | 792 | populateLocalView(); |
793 | } else { | 793 | } else { |
794 | currentDir.cdUp(); | 794 | currentDir.cdUp(); |
795 | populateLocalView(); | 795 | populateLocalView(); |
796 | } | 796 | } |
797 | if(QDir(strItem).exists()){ | 797 | if(QDir(strItem).exists()){ |
798 | currentDir.cd(strItem, TRUE); | 798 | currentDir.cd(strItem, TRUE); |
799 | populateLocalView(); | 799 | populateLocalView(); |
800 | } | 800 | } |
801 | } else { | 801 | } else { |
802 | strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem); | 802 | strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem); |
803 | if( QFile::exists(strItem ) ) { | 803 | if( QFile::exists(strItem ) ) { |
804 | // qDebug("upload "+strItem); | 804 | // qDebug("upload "+strItem); |
805 | return; | 805 | return; |
806 | } | 806 | } |
807 | } //end not symlink | 807 | } //end not symlink |
808 | chdir(strItem.latin1()); | 808 | chdir(strItem.latin1()); |
809 | } | 809 | } |
810 | } | 810 | } |
811 | } | 811 | } |
812 | 812 | ||
813 | void OpieFtp::doLocalCd() | 813 | void OpieFtp::doLocalCd() |
814 | { | 814 | { |
815 | localListClicked( Local_View->currentItem()); | 815 | localListClicked( Local_View->currentItem()); |
816 | } | 816 | } |
817 | 817 | ||
818 | void OpieFtp:: doRemoteCd() | 818 | void OpieFtp:: doRemoteCd() |
819 | { | 819 | { |
820 | remoteListClicked( Remote_View->currentItem()); | 820 | remoteListClicked( Remote_View->currentItem()); |
821 | 821 | ||
822 | } | 822 | } |
823 | 823 | ||
824 | void OpieFtp::showHidden() | 824 | void OpieFtp::showHidden() |
825 | { | 825 | { |
826 | if (!b) { | 826 | if (!b) { |
827 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 827 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
828 | localMenu->setItemChecked(localMenu->idAt(0),TRUE); | 828 | localMenu->setItemChecked(localMenu->idAt(0),TRUE); |
829 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 829 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
830 | b=TRUE; | 830 | b=TRUE; |
831 | 831 | ||
832 | } else { | 832 | } else { |
833 | currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); | 833 | currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); |
834 | localMenu->setItemChecked(localMenu->idAt(0),FALSE); | 834 | localMenu->setItemChecked(localMenu->idAt(0),FALSE); |
835 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 835 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
836 | b=FALSE; | 836 | b=FALSE; |
837 | } | 837 | } |
838 | populateLocalView(); | 838 | populateLocalView(); |
839 | } | 839 | } |
840 | 840 | ||
841 | void OpieFtp::ListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) | 841 | void OpieFtp::ListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) |
842 | { | 842 | { |
843 | // if(item) | 843 | // if(item) |
844 | if (mouse == 2) { | 844 | if (mouse == 2) { |
845 | showLocalMenu(item); | 845 | showLocalMenu(item); |
846 | } | 846 | } |
847 | } | 847 | } |
848 | 848 | ||
849 | void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) | 849 | void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) |
850 | { | 850 | { |
851 | if(mouse == 2) { | 851 | if(mouse == 2) { |
852 | showRemoteMenu(item); | 852 | showRemoteMenu(item); |
853 | } | 853 | } |
854 | } | 854 | } |
855 | 855 | ||
856 | void OpieFtp::showRemoteMenu(QListViewItem * item) | 856 | void OpieFtp::showRemoteMenu(QListViewItem * item) |
857 | { | 857 | { |
858 | QPopupMenu * m;// = new QPopupMenu( Local_View ); | 858 | QPopupMenu * m;// = new QPopupMenu( Local_View ); |
859 | m = new QPopupMenu(this); | 859 | m = new QPopupMenu(this); |
860 | if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) != -1) | 860 | if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) != -1) |
861 | m->insertItem( tr( "Change Directory" ), this, SLOT( doRemoteCd() )); | 861 | m->insertItem( tr( "Change Directory" ), this, SLOT( doRemoteCd() )); |
862 | else | 862 | else |
863 | m->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); | 863 | m->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); |
864 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | 864 | m->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); |
865 | m->insertItem( tr("Rescan"), this, SLOT( populateLocalView() )); | ||
865 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); | 866 | m->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); |
866 | m->insertSeparator(); | 867 | m->insertSeparator(); |
867 | m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); | 868 | m->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); |
868 | m->exec( QCursor::pos() ); | 869 | m->exec( QCursor::pos() ); |
869 | delete m; | 870 | delete m; |
870 | } | 871 | } |
871 | 872 | ||
872 | void OpieFtp::showLocalMenu(QListViewItem * item) | 873 | void OpieFtp::showLocalMenu(QListViewItem * item) |
873 | { | 874 | { |
874 | 875 | ||
875 | QPopupMenu *m; | 876 | QPopupMenu *m; |
876 | m = new QPopupMenu( this); | 877 | m = new QPopupMenu( this); |
877 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | 878 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); |
878 | m->insertSeparator(); | 879 | m->insertSeparator(); |
879 | if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) !=-1) | 880 | if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) !=-1) |
880 | m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); | 881 | m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); |
881 | else | 882 | else |
882 | m->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); | 883 | m->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); |
883 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | 884 | m->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); |
885 | m->insertItem( tr("Rescan"), this, SLOT( populateRemoteView() )); | ||
884 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); | 886 | m->insertItem( tr( "Rename" ), this, SLOT( localRename() )); |
885 | m->insertSeparator(); | 887 | m->insertSeparator(); |
886 | m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); | 888 | m->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); |
887 | m->setCheckable(TRUE); | 889 | m->setCheckable(TRUE); |
888 | if (b) | 890 | if (b) |
889 | m->setItemChecked(m->idAt(0),TRUE); | 891 | m->setItemChecked(m->idAt(0),TRUE); |
890 | else | 892 | else |
891 | m->setItemChecked(m->idAt(0),FALSE); | 893 | m->setItemChecked(m->idAt(0),FALSE); |
892 | 894 | ||
893 | m->exec( QCursor::pos() ); | 895 | m->exec( QCursor::pos() ); |
894 | delete m; | 896 | delete m; |
895 | } | 897 | } |
896 | 898 | ||
897 | void OpieFtp::localMakDir() | 899 | void OpieFtp::localMakDir() |
898 | { | 900 | { |
899 | InputDialog *fileDlg; | 901 | InputDialog *fileDlg; |
900 | fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0); | 902 | fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0); |
901 | fileDlg->exec(); | 903 | fileDlg->exec(); |
902 | if( fileDlg->result() == 1 ) { | 904 | if( fileDlg->result() == 1 ) { |
903 | QString filename = fileDlg->LineEdit1->text(); | 905 | QString filename = fileDlg->LineEdit1->text(); |
904 | currentDir.mkdir( currentDir.canonicalPath()+"/"+filename); | 906 | currentDir.mkdir( currentDir.canonicalPath()+"/"+filename); |
905 | } | 907 | } |
906 | populateLocalView(); | 908 | populateLocalView(); |
907 | } | 909 | } |
908 | 910 | ||
909 | void OpieFtp::localDelete() | 911 | void OpieFtp::localDelete() |
910 | { | 912 | { |
911 | QList<QListViewItem> * getSelectedItems( QListView * Local_View ); | 913 | QList<QListViewItem> * getSelectedItems( QListView * Local_View ); |
912 | QListViewItemIterator it( Local_View ); | 914 | QListViewItemIterator it( Local_View ); |
913 | for ( ; it.current(); ++it ) { | 915 | for ( ; it.current(); ++it ) { |
914 | if ( it.current()->isSelected() ) { | 916 | if ( it.current()->isSelected() ) { |
915 | QString f = it.current()->text(0); | 917 | QString f = it.current()->text(0); |
916 | it.current()->setSelected(FALSE); | 918 | it.current()->setSelected(FALSE); |
917 | 919 | ||
918 | // QString f = Local_View->currentItem()->text(0); | 920 | // QString f = Local_View->currentItem()->text(0); |
919 | if(QDir(f).exists() ) { | 921 | if(QDir(f).exists() ) { |
920 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+ | 922 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+ |
921 | tr(" ?\nIt must be empty"),tr("Yes"),tr("No"),0,0,1) ) { | 923 | tr(" ?\nIt must be empty"),tr("Yes"),tr("No"),0,0,1) ) { |
922 | case 0: { | 924 | case 0: { |
923 | f=currentDir.canonicalPath()+"/"+f; | 925 | f=currentDir.canonicalPath()+"/"+f; |
924 | QString cmd="rmdir "+f; | 926 | QString cmd="rmdir "+f; |
925 | system( cmd.latin1()); | 927 | system( cmd.latin1()); |
926 | } | 928 | } |
927 | break; | 929 | break; |
928 | case 1: | 930 | case 1: |
929 | // exit | 931 | // exit |
930 | break; | 932 | break; |
931 | }; | 933 | }; |
932 | 934 | ||
933 | } else { | 935 | } else { |
934 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f | 936 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f |
935 | +" ?",tr("Yes"),tr("No"),0,0,1) ) { | 937 | +" ?",tr("Yes"),tr("No"),0,0,1) ) { |
936 | case 0: { | 938 | case 0: { |
937 | f=currentDir.canonicalPath()+"/"+f; | 939 | f=currentDir.canonicalPath()+"/"+f; |
938 | QString cmd="rm "+f; | 940 | QString cmd="rm "+f; |
939 | system( cmd.latin1()); | 941 | system( cmd.latin1()); |
940 | } | 942 | } |
941 | break; | 943 | break; |
942 | case 1: | 944 | case 1: |
943 | // exit | 945 | // exit |
944 | break; | 946 | break; |
945 | }; | 947 | }; |
946 | } | 948 | } |
947 | } | 949 | } |
948 | } | 950 | } |
949 | populateLocalView(); | 951 | populateLocalView(); |
950 | 952 | ||
951 | } | 953 | } |
952 | 954 | ||
953 | void OpieFtp::remoteMakDir() | 955 | void OpieFtp::remoteMakDir() |
954 | { | 956 | { |
955 | InputDialog *fileDlg; | 957 | InputDialog *fileDlg; |
956 | fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0); | 958 | fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0); |
957 | fileDlg->exec(); | 959 | fileDlg->exec(); |
958 | if( fileDlg->result() == 1 ) { | 960 | if( fileDlg->result() == 1 ) { |
959 | QString filename = fileDlg->LineEdit1->text();//+".playlist"; | 961 | QString filename = fileDlg->LineEdit1->text();//+".playlist"; |
960 | QString tmp=currentRemoteDir+filename; | 962 | QString tmp=currentRemoteDir+filename; |
961 | // QCopEnvelope ( "QPE/System", "busy()" ); | 963 | // QCopEnvelope ( "QPE/System", "busy()" ); |
962 | if(FtpMkdir( tmp.latin1(), conn) == 0) { | 964 | if(FtpMkdir( tmp.latin1(), conn) == 0) { |
963 | QString msg; | 965 | QString msg; |
964 | msg.sprintf(tr("Unable to make directory\n")+"%s",FtpLastResponse(conn)); | 966 | msg.sprintf(tr("Unable to make directory\n")+"%s",FtpLastResponse(conn)); |
965 | msg.replace(QRegExp(":"),"\n"); | 967 | msg.replace(QRegExp(":"),"\n"); |
966 | QMessageBox::message(tr("Note"),msg); | 968 | QMessageBox::message(tr("Note"),msg); |
967 | } | 969 | } |
968 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 970 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
969 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate | 971 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate |
970 | } | 972 | } |
971 | } | 973 | } |
972 | 974 | ||
973 | void OpieFtp::remoteDelete() | 975 | void OpieFtp::remoteDelete() |
974 | { | 976 | { |
975 | QList<QListViewItem> * getSelectedItems( QListView * Remote_View ); | 977 | QList<QListViewItem> * getSelectedItems( QListView * Remote_View ); |
976 | QListViewItemIterator it( Remote_View ); | 978 | QListViewItemIterator it( Remote_View ); |
977 | for ( ; it.current(); ++it ) { | 979 | for ( ; it.current(); ++it ) { |
978 | if ( it.current()->isSelected() ) { | 980 | if ( it.current()->isSelected() ) { |
979 | QString f = it.current()->text(0); | 981 | QString f = it.current()->text(0); |
980 | // QString f = Remote_View->currentItem()->text(0); | 982 | // QString f = Remote_View->currentItem()->text(0); |
981 | // QCopEnvelope ( "QPE/System", "busy()" ); | 983 | // QCopEnvelope ( "QPE/System", "busy()" ); |
982 | if( f.right(1) =="/") { | 984 | if( f.right(1) =="/") { |
983 | QString path= currentRemoteDir+f; | 985 | QString path= currentRemoteDir+f; |
984 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+"?" | 986 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+"?" |
985 | ,tr("Yes"),tr("No"),0,0,1) ) { | 987 | ,tr("Yes"),tr("No"),0,0,1) ) { |
986 | case 0: { | 988 | case 0: { |
987 | f=currentDir.canonicalPath()+"/"+f; | 989 | f=currentDir.canonicalPath()+"/"+f; |
988 | if(FtpRmdir( path.latin1(), conn) ==0) { | 990 | if(FtpRmdir( path.latin1(), conn) ==0) { |
989 | QString msg; | 991 | QString msg; |
990 | msg.sprintf(tr("Unable to remove directory\n")+"%s",FtpLastResponse(conn)); | 992 | msg.sprintf(tr("Unable to remove directory\n")+"%s",FtpLastResponse(conn)); |
991 | msg.replace(QRegExp(":"),"\n"); | 993 | msg.replace(QRegExp(":"),"\n"); |
992 | QMessageBox::message(tr("Note"),msg); | 994 | QMessageBox::message(tr("Note"),msg); |
993 | } | 995 | } |
994 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate | 996 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate |
995 | } | 997 | } |
996 | break; | 998 | break; |
997 | }; | 999 | }; |
998 | } else { | 1000 | } else { |
999 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+"?" | 1001 | switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+"?" |
1000 | ,tr("Yes"),tr("No"),0,0,1) ) { | 1002 | ,tr("Yes"),tr("No"),0,0,1) ) { |
1001 | case 0: { | 1003 | case 0: { |
1002 | QString path= currentRemoteDir+f; | 1004 | QString path= currentRemoteDir+f; |
1003 | if(FtpDelete( path.latin1(), conn)==0) { | 1005 | if(FtpDelete( path.latin1(), conn)==0) { |
1004 | QString msg; | 1006 | QString msg; |
1005 | msg.sprintf(tr("Unable to delete file\n")+"%s",FtpLastResponse(conn)); | 1007 | msg.sprintf(tr("Unable to delete file\n")+"%s",FtpLastResponse(conn)); |
1006 | msg.replace(QRegExp(":"),"\n"); | 1008 | msg.replace(QRegExp(":"),"\n"); |
1007 | QMessageBox::message(tr("Note"),msg); | 1009 | QMessageBox::message(tr("Note"),msg); |
1008 | } | 1010 | } |
1009 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate | 1011 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate |
1010 | } | 1012 | } |
1011 | break; | 1013 | break; |