summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm
authorllornkcor <llornkcor>2002-12-16 04:14:46 (UTC)
committer llornkcor <llornkcor>2002-12-16 04:14:46 (UTC)
commitcc6c77e7014a3056debd6963946265671d41517d (patch) (side-by-side diff)
tree1b8f929dd83a8d64915b91ecb3052c19ff5ac0b5 /noncore/apps/advancedfm
parentb1880703eea8601e06cf3d3e8593b649cd1a485e (diff)
downloadopie-cc6c77e7014a3056debd6963946265671d41517d.zip
opie-cc6c77e7014a3056debd6963946265671d41517d.tar.gz
opie-cc6c77e7014a3056debd6963946265671d41517d.tar.bz2
send as text the real filename is symlink
Diffstat (limited to 'noncore/apps/advancedfm') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp8
-rw-r--r--noncore/apps/advancedfm/advancedfm.h1
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp34
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) {
if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink
- QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4);
+ QString strItem2 = dealWithSymName((const QString&)strItem);
+// QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4);
if(QDir(strItem2).exists() ) {
@@ -363,3 +364,4 @@ void AdvancedFm::remoteListClicked(QListViewItem *selectedItem) {
if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink
- QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4);
+ QString strItem2 = dealWithSymName((const QString&)strItem);
+// QString strItem2 = strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4);
currentRemoteDir.cd(strItem2, TRUE);
@@ -463,3 +465,3 @@ void AdvancedFm::currentPathComboChanged() {
void AdvancedFm::fillCombo(const QString &currentPath) {
-
+ qDebug("%d",TabWidget->getCurrentTab());
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:
QString checkDiskSpace(const QString &);
+ QString dealWithSymName(const QString &);
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() {
+QString AdvancedFm::dealWithSymName(const QString &fileName) {
+ QString strItem = fileName;
+ return strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4);
+}
+
void AdvancedFm::runThis() {
@@ -109,5 +114,8 @@ void AdvancedFm::runThis() {
QString curFile = Local_View->currentItem()->text(0);
+ if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink
+ curFile = dealWithSymName((const QString&)curFile);
+
if(curFile != "../") {
- fs= getFileSystemType((const QString &) currentDir.canonicalPath());
+ fs = getFileSystemType((const QString &) currentDir.canonicalPath());
QFileInfo fileInfo( currentDir.canonicalPath()+"/"+curFile);
@@ -134,2 +142,4 @@ void AdvancedFm::runThis() {
if(curFile != "../") {
+ if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink
+ curFile = dealWithSymName((const QString&)curFile);
@@ -162,2 +172,4 @@ void AdvancedFm::runText() {
if(curFile != "../") {
+ if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink
+ curFile = dealWithSymName((const QString&)curFile);
curFile = currentDir.canonicalPath()+"/"+curFile;
@@ -170,2 +182,4 @@ void AdvancedFm::runText() {
curFile = currentRemoteDir.canonicalPath()+"/"+curFile;
+ if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink
+ curFile = dealWithSymName((const QString&)curFile);
DocLnk nf(curFile);
@@ -484,3 +498,3 @@ void AdvancedFm::copy() {
}
- if(!copyFile(destFile, curFile) ) {
+ if(!copyFile( curFile, destFile) ) {
QMessageBox::message("AdvancedFm","Could not copy\n"+curFile +"to\n"+destFile);
@@ -515,3 +529,3 @@ void AdvancedFm::copy() {
}
- if(!copyFile(destFile, curFile) ) {
+ if(!copyFile( curFile, destFile) ) {
QMessageBox::message("AdvancedFm",tr("Could not copy\n")
@@ -563,3 +577,3 @@ void AdvancedFm::copyAs() {
}
- if(!copyFile(destFile, curFile) ) {
+ if(!copyFile( curFile,destFile) ) {
QMessageBox::message("AdvancedFm",tr("Could not copy\n")
@@ -603,3 +617,3 @@ void AdvancedFm::copyAs() {
}
- if(!copyFile(destFile, curFile) ) {
+ if(!copyFile( curFile,destFile) ) {
QMessageBox::message("AdvancedFm",tr("Could not copy\n")
@@ -653,3 +667,3 @@ void AdvancedFm::copySameDir() {
}
- if(!copyFile(destFile, curFile) ) {
+ if(!copyFile( curFile,destFile) ) {
QMessageBox::message("AdvancedFm",tr("Could not copy\n")
@@ -691,3 +705,3 @@ void AdvancedFm::copySameDir() {
}
- if(!copyFile(destFile, curFile) ) {
+ if(!copyFile( curFile,destFile) ) {
QMessageBox::message("AdvancedFm",tr("Could not copy\n")
@@ -732,3 +746,3 @@ void AdvancedFm::move() {
if( f.exists()) {
- if(!copyFile( destFile, curFile) ) {
+ if(!copyFile( curFile,destFile) ) {
QMessageBox::message(tr("Note"),tr("Could not move\n")+curFile);
@@ -764,3 +778,3 @@ void AdvancedFm::move() {
if( f.exists()) {
- if(!copyFile( destFile, curFile) ) {
+ if(!copyFile( curFile, destFile) ) {
QMessageBox::message(tr("Note"),tr("Could not move\n") + curFile);
@@ -778,3 +792,3 @@ void AdvancedFm::move() {
-bool AdvancedFm::copyFile( const QString & dest, const QString & src ) {
+bool AdvancedFm::copyFile( const QString & src, const QString & dest ) {
char bf[ 50000 ];