summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-05-16 14:27:10 (UTC)
committer llornkcor <llornkcor>2002-05-16 14:27:10 (UTC)
commitf8f0d4d49e8edf20a2ce7b790b86d60b838b1b9e (patch) (unidiff)
tree2f0bf0216e253bddff259bca5c78ed1c07fa82e6
parent9e411b20fd2a1c347f410c836150aa56c9668707 (diff)
downloadopie-f8f0d4d49e8edf20a2ce7b790b86d60b838b1b9e.zip
opie-f8f0d4d49e8edf20a2ce7b790b86d60b838b1b9e.tar.gz
opie-f8f0d4d49e8edf20a2ce7b790b86d60b838b1b9e.tar.bz2
spelling error
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 9606269..3a8c22d 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -844,193 +844,193 @@ void AdvancedFm::localDelete()
844 f=f.left(f.length()-1); 844 f=f.left(f.length()-1);
845 QString cmd="rm -rf "+f; 845 QString cmd="rm -rf "+f;
846 system( cmd.latin1()); 846 system( cmd.latin1());
847 populateLocalView(); 847 populateLocalView();
848 } 848 }
849 break; 849 break;
850 case 1: 850 case 1:
851 // exit 851 // exit
852 break; 852 break;
853 }; 853 };
854 854
855 } else { 855 } else {
856 switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f 856 switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f
857 +" ?",tr("Yes"),tr("No"),0,0,1) ) { 857 +" ?",tr("Yes"),tr("No"),0,0,1) ) {
858 case 0: { 858 case 0: {
859 QString cmd="rm "+f; 859 QString cmd="rm "+f;
860 QFile file(f); 860 QFile file(f);
861 file.remove(); 861 file.remove();
862// system( cmd.latin1()); 862// system( cmd.latin1());
863 populateLocalView(); 863 populateLocalView();
864 } 864 }
865 break; 865 break;
866 case 1: 866 case 1:
867 // exit 867 // exit
868 break; 868 break;
869 }; 869 };
870 } 870 }
871 } 871 }
872} 872}
873 873
874void AdvancedFm::remoteDelete() 874void AdvancedFm::remoteDelete()
875{ 875{
876 QStringList curFileList = getPath(); 876 QStringList curFileList = getPath();
877 QString myFile; 877 QString myFile;
878 878
879 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 879 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
880 myFile = (*it); 880 myFile = (*it);
881 if(myFile.find(" -> ",0,TRUE) != -1) 881 if(myFile.find(" -> ",0,TRUE) != -1)
882 myFile = myFile.left(myFile.find(" -> ",0,TRUE)); 882 myFile = myFile.left(myFile.find(" -> ",0,TRUE));
883 QString f = currentRemoteDir.canonicalPath(); 883 QString f = currentRemoteDir.canonicalPath();
884 if(f.right(1).find("/",0,TRUE) == -1) 884 if(f.right(1).find("/",0,TRUE) == -1)
885 f+="/"; 885 f+="/";
886 f+=myFile; 886 f+=myFile;
887 if(QDir(f).exists() && !QFileInfo(f).isSymLink() ) { 887 if(QDir(f).exists() && !QFileInfo(f).isSymLink() ) {
888 switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+ 888 switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+
889 "\nand all it's contents ?", 889 "\nand all it's contents ?",
890 tr("Yes"),tr("No"),0,0,1) ) { 890 tr("Yes"),tr("No"),0,0,1) ) {
891 case 0: { 891 case 0: {
892 f=f.left(f.length()-1); 892 f=f.left(f.length()-1);
893 QString cmd="rm -rf "+f; 893 QString cmd="rm -rf "+f;
894 system( cmd.latin1()); 894 system( cmd.latin1());
895 populateRemoteView(); 895 populateRemoteView();
896 } 896 }
897 break; 897 break;
898 case 1: 898 case 1:
899 // exit 899 // exit
900 break; 900 break;
901 }; 901 };
902 902
903 } else { 903 } else {
904 switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f 904 switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f
905 +" ?",tr("Yes"),tr("No"),0,0,1) ) { 905 +" ?",tr("Yes"),tr("No"),0,0,1) ) {
906 case 0: { 906 case 0: {
907 QString cmd="rm "+f; 907 QString cmd="rm "+f;
908 QFile file(f); 908 QFile file(f);
909 file.remove(); 909 file.remove();
910// system( cmd.latin1()); 910// system( cmd.latin1());
911 populateRemoteView(); 911 populateRemoteView();
912 } 912 }
913 break; 913 break;
914 case 1: 914 case 1:
915 // exit 915 // exit
916 break; 916 break;
917 }; 917 };
918 } 918 }
919 } 919 }
920} 920}
921 921
922void AdvancedFm::localRename() 922void AdvancedFm::localRename()
923{ 923{
924 QString curFile = Local_View->currentItem()->text(0); 924 QString curFile = Local_View->currentItem()->text(0);
925 InputDialog *fileDlg; 925 InputDialog *fileDlg;
926 fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); 926 fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0);
927 fileDlg->setInputText((const QString &)curFile); 927 fileDlg->setInputText((const QString &)curFile);
928 fileDlg->exec(); 928 fileDlg->exec();
929 if( fileDlg->result() == 1 ) { 929 if( fileDlg->result() == 1 ) {
930 QString oldname = currentDir.canonicalPath() + "/" + curFile; 930 QString oldname = currentDir.canonicalPath() + "/" + curFile;
931 QString newName = currentDir.canonicalPath() + "/" + fileDlg->LineEdit1->text();//+".playlist"; 931 QString newName = currentDir.canonicalPath() + "/" + fileDlg->LineEdit1->text();//+".playlist";
932 if( rename(oldname.latin1(), newName.latin1())== -1) 932 if( rename(oldname.latin1(), newName.latin1())== -1)
933 QMessageBox::message(tr("Note"),tr("Could not rename")); 933 QMessageBox::message(tr("Note"),tr("Could not rename"));
934 } 934 }
935 populateLocalView(); 935 populateLocalView();
936} 936}
937 937
938void AdvancedFm::remoteRename() 938void AdvancedFm::remoteRename()
939{ 939{
940 QString curFile = remote_View->currentItem()->text(0); 940 QString curFile = Remote_View->currentItem()->text(0);
941 InputDialog *fileDlg; 941 InputDialog *fileDlg;
942 fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); 942 fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0);
943 fileDlg->setInputText((const QString &)curFile); 943 fileDlg->setInputText((const QString &)curFile);
944 fileDlg->exec(); 944 fileDlg->exec();
945 if( fileDlg->result() == 1 ) { 945 if( fileDlg->result() == 1 ) {
946 QString oldname = currentRemoteDir.canonicalPath() + "/" + curFile; 946 QString oldname = currentRemoteDir.canonicalPath() + "/" + curFile;
947 QString newName = currentRemoteDir.canonicalPath() + "/" + fileDlg->LineEdit1->text();//+".playlist"; 947 QString newName = currentRemoteDir.canonicalPath() + "/" + fileDlg->LineEdit1->text();//+".playlist";
948 if( rename(oldname.latin1(), newName.latin1())== -1) 948 if( rename(oldname.latin1(), newName.latin1())== -1)
949 QMessageBox::message(tr("Note"),tr("Could not rename")); 949 QMessageBox::message(tr("Note"),tr("Could not rename"));
950 } 950 }
951 populateRemoteView(); 951 populateRemoteView();
952} 952}
953 953
954void AdvancedFm::switchToLocalTab() 954void AdvancedFm::switchToLocalTab()
955{ 955{
956 TabWidget->setCurrentPage(0); 956 TabWidget->setCurrentPage(0);
957 Local_View->setFocus(); 957 Local_View->setFocus();
958} 958}
959 959
960void AdvancedFm::switchToRemoteTab() 960void AdvancedFm::switchToRemoteTab()
961{ 961{
962 TabWidget->setCurrentPage(1); 962 TabWidget->setCurrentPage(1);
963 Remote_View->setFocus(); 963 Remote_View->setFocus();
964} 964}
965 965
966void AdvancedFm::readConfig() 966void AdvancedFm::readConfig()
967{ 967{
968 Config cfg("AdvancedFm"); 968 Config cfg("AdvancedFm");
969} 969}
970 970
971void AdvancedFm::writeConfig() 971void AdvancedFm::writeConfig()
972{ 972{
973 Config cfg("AdvancedFm"); 973 Config cfg("AdvancedFm");
974} 974}
975 975
976void AdvancedFm::currentPathComboChanged() 976void AdvancedFm::currentPathComboChanged()
977{ 977{
978 if (TabWidget->currentPageIndex() == 0) { 978 if (TabWidget->currentPageIndex() == 0) {
979 if(QDir( currentPathCombo->lineEdit()->text()).exists()) { 979 if(QDir( currentPathCombo->lineEdit()->text()).exists()) {
980 currentDir.setPath( currentPathCombo->lineEdit()->text() ); 980 currentDir.setPath( currentPathCombo->lineEdit()->text() );
981 populateLocalView(); 981 populateLocalView();
982 } else { 982 } else {
983 QMessageBox::message(tr("Note"),tr("That directory does not exist")); 983 QMessageBox::message(tr("Note"),tr("That directory does not exist"));
984 } 984 }
985 } 985 }
986 if (TabWidget->currentPageIndex() == 0) { 986 if (TabWidget->currentPageIndex() == 0) {
987 if(QDir( currentPathCombo->lineEdit()->text()).exists()) { 987 if(QDir( currentPathCombo->lineEdit()->text()).exists()) {
988 currentRemoteDir.setPath( currentPathCombo->lineEdit()->text() ); 988 currentRemoteDir.setPath( currentPathCombo->lineEdit()->text() );
989 populateRemoteView(); 989 populateRemoteView();
990 } else { 990 } else {
991 QMessageBox::message(tr("Note"),tr("That directory does not exist")); 991 QMessageBox::message(tr("Note"),tr("That directory does not exist"));
992 } 992 }
993 } 993 }
994} 994}
995 995
996void AdvancedFm::fillCombo(const QString &currentPath) { 996void AdvancedFm::fillCombo(const QString &currentPath) {
997 997
998 if (TabWidget->currentPageIndex() == 0) { 998 if (TabWidget->currentPageIndex() == 0) {
999 currentPathCombo->lineEdit()->setText( currentPath); 999 currentPathCombo->lineEdit()->setText( currentPath);
1000 if( localDirPathStringList.grep(currentPath,TRUE).isEmpty() ) { 1000 if( localDirPathStringList.grep(currentPath,TRUE).isEmpty() ) {
1001 currentPathCombo->clear(); 1001 currentPathCombo->clear();
1002 localDirPathStringList.prepend( currentPath ); 1002 localDirPathStringList.prepend( currentPath );
1003 currentPathCombo->insertStringList( localDirPathStringList,-1); 1003 currentPathCombo->insertStringList( localDirPathStringList,-1);
1004 } 1004 }
1005 } else { 1005 } else {
1006 currentPathCombo->lineEdit()->setText( currentPath); 1006 currentPathCombo->lineEdit()->setText( currentPath);
1007 if( remoteDirPathStringList.grep( currentPath,TRUE).isEmpty() ) { 1007 if( remoteDirPathStringList.grep( currentPath,TRUE).isEmpty() ) {
1008 currentPathCombo->clear(); 1008 currentPathCombo->clear();
1009 remoteDirPathStringList.prepend( currentPath ); 1009 remoteDirPathStringList.prepend( currentPath );
1010 currentPathCombo->insertStringList( remoteDirPathStringList,-1); 1010 currentPathCombo->insertStringList( remoteDirPathStringList,-1);
1011 } 1011 }
1012 } 1012 }
1013} 1013}
1014 1014
1015void AdvancedFm::currentPathComboActivated(const QString & currentPath) { 1015void AdvancedFm::currentPathComboActivated(const QString & currentPath) {
1016 if (TabWidget->currentPageIndex() == 0) { 1016 if (TabWidget->currentPageIndex() == 0) {
1017 chdir( currentPath.latin1() ); 1017 chdir( currentPath.latin1() );
1018 currentDir.cd( currentPath, TRUE); 1018 currentDir.cd( currentPath, TRUE);
1019 populateLocalView(); 1019 populateLocalView();
1020 update(); 1020 update();
1021 } else { 1021 } else {
1022 chdir( currentPath.latin1() ); 1022 chdir( currentPath.latin1() );
1023 currentRemoteDir.cd( currentPath, TRUE); 1023 currentRemoteDir.cd( currentPath, TRUE);
1024 populateRemoteView(); 1024 populateRemoteView();
1025 update(); 1025 update();
1026 } 1026 }
1027} 1027}
1028 1028
1029void AdvancedFm::filePerms() { 1029void AdvancedFm::filePerms() {
1030 1030
1031 QStringList curFileList = getPath(); 1031 QStringList curFileList = getPath();
1032 QString filePath; 1032 QString filePath;
1033 1033
1034 if (TabWidget->currentPageIndex() == 0) { 1034 if (TabWidget->currentPageIndex() == 0) {
1035 filePath = currentDir.canonicalPath()+"/"; 1035 filePath = currentDir.canonicalPath()+"/";
1036 } else { 1036 } else {