-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 1 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 34 |
3 files changed, 30 insertions, 13 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 92804b2..c653b90 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -317,3 +317,4 @@ void AdvancedFm::localListClicked(QListViewItem *selectedItem) { | |||
317 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink | 317 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink |
318 | QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); | 318 | QString strItem2 = dealWithSymName((const QString&)strItem); |
319 | // QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); | ||
319 | if(QDir(strItem2).exists() ) { | 320 | if(QDir(strItem2).exists() ) { |
@@ -363,3 +364,4 @@ void AdvancedFm::remoteListClicked(QListViewItem *selectedItem) { | |||
363 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink | 364 | if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink |
364 | QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); | 365 | QString strItem2 = dealWithSymName((const QString&)strItem); |
366 | // QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); | ||
365 | currentRemoteDir.cd(strItem2, TRUE); | 367 | currentRemoteDir.cd(strItem2, TRUE); |
@@ -463,3 +465,3 @@ void AdvancedFm::currentPathComboChanged() { | |||
463 | void AdvancedFm::fillCombo(const QString ¤tPath) { | 465 | void AdvancedFm::fillCombo(const QString ¤tPath) { |
464 | 466 | qDebug("%d",TabWidget->getCurrentTab()); | |
465 | if (TabWidget->getCurrentTab() == 0) { | 467 | if (TabWidget->getCurrentTab() == 0) { |
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index 9948255..7ced056 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h | |||
@@ -126,2 +126,3 @@ protected: | |||
126 | QString checkDiskSpace(const QString &); | 126 | QString checkDiskSpace(const QString &); |
127 | QString dealWithSymName(const QString &); | ||
127 | 128 | ||
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 0a9f921..f77554a 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp | |||
@@ -105,2 +105,7 @@ void AdvancedFm::showRemoteHidden() { | |||
105 | 105 | ||
106 | QString AdvancedFm::dealWithSymName(const QString &fileName) { | ||
107 | QString strItem = fileName; | ||
108 | return strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); | ||
109 | } | ||
110 | |||
106 | void AdvancedFm::runThis() { | 111 | void AdvancedFm::runThis() { |
@@ -109,5 +114,8 @@ void AdvancedFm::runThis() { | |||
109 | QString curFile = Local_View->currentItem()->text(0); | 114 | QString curFile = Local_View->currentItem()->text(0); |
115 | if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink | ||
116 | curFile = dealWithSymName((const QString&)curFile); | ||
117 | |||
110 | if(curFile != "../") { | 118 | if(curFile != "../") { |
111 | 119 | ||
112 | fs= getFileSystemType((const QString &) currentDir.canonicalPath()); | 120 | fs = getFileSystemType((const QString &) currentDir.canonicalPath()); |
113 | QFileInfo fileInfo( currentDir.canonicalPath()+"/"+curFile); | 121 | QFileInfo fileInfo( currentDir.canonicalPath()+"/"+curFile); |
@@ -134,2 +142,4 @@ void AdvancedFm::runThis() { | |||
134 | if(curFile != "../") { | 142 | if(curFile != "../") { |
143 | if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink | ||
144 | curFile = dealWithSymName((const QString&)curFile); | ||
135 | 145 | ||
@@ -162,2 +172,4 @@ void AdvancedFm::runText() { | |||
162 | if(curFile != "../") { | 172 | if(curFile != "../") { |
173 | if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink | ||
174 | curFile = dealWithSymName((const QString&)curFile); | ||
163 | curFile = currentDir.canonicalPath()+"/"+curFile; | 175 | curFile = currentDir.canonicalPath()+"/"+curFile; |
@@ -170,2 +182,4 @@ void AdvancedFm::runText() { | |||
170 | curFile = currentRemoteDir.canonicalPath()+"/"+curFile; | 182 | curFile = currentRemoteDir.canonicalPath()+"/"+curFile; |
183 | if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink | ||
184 | curFile = dealWithSymName((const QString&)curFile); | ||
171 | DocLnk nf(curFile); | 185 | DocLnk nf(curFile); |
@@ -484,3 +498,3 @@ void AdvancedFm::copy() { | |||
484 | } | 498 | } |
485 | if(!copyFile(destFile, curFile) ) { | 499 | if(!copyFile( curFile, destFile) ) { |
486 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); | 500 | QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile); |
@@ -515,3 +529,3 @@ void AdvancedFm::copy() { | |||
515 | } | 529 | } |
516 | if(!copyFile(destFile, curFile) ) { | 530 | if(!copyFile( curFile, destFile) ) { |
517 | QMessageBox::message("AdvancedFm",tr("Could not copy\n") | 531 | QMessageBox::message("AdvancedFm",tr("Could not copy\n") |
@@ -563,3 +577,3 @@ void AdvancedFm::copyAs() { | |||
563 | } | 577 | } |
564 | if(!copyFile(destFile, curFile) ) { | 578 | if(!copyFile( curFile,destFile) ) { |
565 | QMessageBox::message("AdvancedFm",tr("Could not copy\n") | 579 | QMessageBox::message("AdvancedFm",tr("Could not copy\n") |
@@ -603,3 +617,3 @@ void AdvancedFm::copyAs() { | |||
603 | } | 617 | } |
604 | if(!copyFile(destFile, curFile) ) { | 618 | if(!copyFile( curFile,destFile) ) { |
605 | QMessageBox::message("AdvancedFm",tr("Could not copy\n") | 619 | QMessageBox::message("AdvancedFm",tr("Could not copy\n") |
@@ -653,3 +667,3 @@ void AdvancedFm::copySameDir() { | |||
653 | } | 667 | } |
654 | if(!copyFile(destFile, curFile) ) { | 668 | if(!copyFile( curFile,destFile) ) { |
655 | QMessageBox::message("AdvancedFm",tr("Could not copy\n") | 669 | QMessageBox::message("AdvancedFm",tr("Could not copy\n") |
@@ -691,3 +705,3 @@ void AdvancedFm::copySameDir() { | |||
691 | } | 705 | } |
692 | if(!copyFile(destFile, curFile) ) { | 706 | if(!copyFile( curFile,destFile) ) { |
693 | QMessageBox::message("AdvancedFm",tr("Could not copy\n") | 707 | QMessageBox::message("AdvancedFm",tr("Could not copy\n") |
@@ -732,3 +746,3 @@ void AdvancedFm::move() { | |||
732 | if( f.exists()) { | 746 | if( f.exists()) { |
733 | if(!copyFile( destFile, curFile) ) { | 747 | if(!copyFile( curFile,destFile) ) { |
734 | QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile); | 748 | QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile); |
@@ -764,3 +778,3 @@ void AdvancedFm::move() { | |||
764 | if( f.exists()) { | 778 | if( f.exists()) { |
765 | if(!copyFile( destFile, curFile) ) { | 779 | if(!copyFile( curFile, destFile) ) { |
766 | QMessageBox::message(tr("Note"),tr("Could not move\n") + curFile); | 780 | QMessageBox::message(tr("Note"),tr("Could not move\n") + curFile); |
@@ -778,3 +792,3 @@ void AdvancedFm::move() { | |||
778 | 792 | ||
779 | bool AdvancedFm::copyFile( const QString & dest, const QString & src ) { | 793 | bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { |
780 | char bf[ 50000 ]; | 794 | char bf[ 50000 ]; |