summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp29
1 files changed, 23 insertions, 6 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index f4ca349..b9e254e 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -536,5 +536,8 @@ void AdvancedFm::localListClicked(QListViewItem *selectedItem)
strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem);
if( QFile::exists(strItem ) ) {
-// qDebug("upload "+strItem);
+ qDebug("clicked item "+strItem);
+ DocLnk doc( strItem, FALSE );
+ doc.execute();
+ // Local_View->clearSelection();
}
} //end not symlink
@@ -574,5 +577,8 @@ void AdvancedFm::remoteListClicked(QListViewItem *selectedItem)
strItem=QDir::cleanDirPath( currentRemoteDir.canonicalPath()+"/"+strItem);
if( QFile::exists(strItem ) ) {
-// qDebug("upload "+strItem);
+ qDebug("clicked item "+strItem);
+ DocLnk doc( strItem, FALSE );
+ doc.execute();
+ // Remote_View->clearSelection();
}
} //end not symlink
@@ -662,5 +668,5 @@ void AdvancedFm::showLocalMenu(QListViewItem * item)
m.insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() ));
else
- m.insertItem( tr( "Open" ), this, SLOT( runThis() ));
+ m.insertItem( tr( "Open / Execute" ), this, SLOT( runThis() ));
m.insertItem( tr( "Open as Text" ), this, SLOT( runText() ));
m.insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
@@ -698,5 +704,5 @@ void AdvancedFm::showRemoteMenu(QListViewItem * item)
m.insertItem( tr( "Change Directory" ), this, SLOT( doRemoteCd() ));
else
- m.insertItem( tr( "Open" ), this, SLOT( runThis() ));
+ m.insertItem( tr( "Open / Execute" ), this, SLOT( runThis() ));
m.insertItem( tr( "Open as Text" ), this, SLOT( runText() ));
m.insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
@@ -1038,4 +1044,11 @@ void AdvancedFm::filePerms() {
delete filePerm;
}
+ if (TabWidget->currentPageIndex() == 0) {
+ populateLocalView();
+ } else {
+ populateRemoteView();
+ }
+
+
}
@@ -1403,8 +1416,8 @@ void AdvancedFm::runCommandStd() {
if (TabWidget->currentPageIndex() == 0) {
if( Local_View->currentItem())
- curFile = currentDir.canonicalPath() + Local_View->currentItem()->text(0);
+ curFile = currentDir.canonicalPath() +"/"+ Local_View->currentItem()->text(0);
} else {
if(Remote_View->currentItem())
- curFile = currentRemoteDir.canonicalPath() + Remote_View->currentItem()->text(0);
+ curFile = currentRemoteDir.canonicalPath() +"/"+ Remote_View->currentItem()->text(0);
}
@@ -1557,5 +1570,7 @@ void AdvancedFm::mkSym() {
QString destName = currentRemoteDir.canonicalPath()+"/"+(*it);
+ if(destName.right(1) == "/") destName = destName.left( destName.length() -1);
QString curFile = currentDir.canonicalPath()+"/"+(*it);
+ if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1);
cmd = "ln -s "+curFile+" "+destName;
qDebug(cmd);
@@ -1568,5 +1583,7 @@ void AdvancedFm::mkSym() {
QString destName = currentDir.canonicalPath()+"/"+(*it);
+ if(destName.right(1) == "/") destName = destName.left( destName.length() -1);
QString curFile = currentRemoteDir.canonicalPath()+"/"+(*it);
+ if( curFile.right(1) == "/") curFile = curFile.left( curFile.length() -1);
cmd = "ln -s "+curFile+" "+destName;