summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-05-05 18:15:48 (UTC)
committer llornkcor <llornkcor>2002-05-05 18:15:48 (UTC)
commit5549afd820c485db5ec70ad5bf1faed5821ab04a (patch) (side-by-side diff)
treefd8372f9928c9b8c556b4d03229e80f3e73cb31f
parent4cd02e41953be5b271c877197cf9c12ad4785bef (diff)
downloadopie-5549afd820c485db5ec70ad5bf1faed5821ab04a.zip
opie-5549afd820c485db5ec70ad5bf1faed5821ab04a.tar.gz
opie-5549afd820c485db5ec70ad5bf1faed5821ab04a.tar.bz2
bug fix
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
@@ -534,9 +534,12 @@ void AdvancedFm::localListClicked(QListViewItem *selectedItem)
}
} else {
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
chdir(strItem.latin1());
}
@@ -572,9 +575,12 @@ void AdvancedFm::remoteListClicked(QListViewItem *selectedItem)
}
} else {
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
chdir(strItem.latin1());
}
@@ -660,9 +666,9 @@ void AdvancedFm::showLocalMenu(QListViewItem * item)
m.insertSeparator();
if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) !=-1)
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() ));
m.insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() ));
m.insertSeparator();
@@ -696,9 +702,9 @@ void AdvancedFm::showRemoteMenu(QListViewItem * item)
m.insertSeparator();
if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) !=-1)
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() ));
m.insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() ));
m.insertSeparator();
@@ -1036,8 +1042,15 @@ void AdvancedFm::filePerms() {
filePerm->exec();
if( filePerm)
delete filePerm;
}
+ if (TabWidget->currentPageIndex() == 0) {
+ populateLocalView();
+ } else {
+ populateRemoteView();
+ }
+
+
}
void AdvancedFm::doProperties() {
QStringList curFileList = getPath();
@@ -1401,12 +1414,12 @@ void AdvancedFm::runCommand() {
void AdvancedFm::runCommandStd() {
QString curFile;
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);
}
InputDialog *fileDlg;
fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0);
@@ -1555,9 +1568,11 @@ void AdvancedFm::mkSym() {
if (TabWidget->currentPageIndex() == 0) {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
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);
system(cmd.latin1() );
}
@@ -1566,9 +1581,11 @@ void AdvancedFm::mkSym() {
} else {
for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
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;
qDebug(cmd);
system(cmd.latin1() );