summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm/advancedfmMenu.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/advancedfm/advancedfmMenu.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp102
1 files changed, 41 insertions, 61 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 13dad33..c553017 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -69,6 +69,6 @@ void AdvancedFm::showMenuHidden()
// b=TRUE;
}
- populateLocalView();
- populateRemoteView();
+ populateView();
+// populateRemoteView();
// if(b) qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<< true");
if(b) b = false; else b = true;
@@ -90,5 +90,5 @@ void AdvancedFm::showHidden()
// b=TRUE;
}
- PopulateView();
+ populateView();
}
@@ -166,5 +166,5 @@ void AdvancedFm::makeDir()
thisDir->mkdir( thisDir->canonicalPath()+"/"+filename);
}
- PopulateView();
+ populateView();
}
@@ -215,5 +215,5 @@ void AdvancedFm::doDelete()
QString cmd="rm -rf "+f;
startProcess( (const QString)cmd.latin1() );
- PopulateView();
+ populateView();
}
break;
@@ -239,5 +239,5 @@ void AdvancedFm::doDelete()
}
}
- PopulateView();
+ populateView();
}
@@ -258,5 +258,5 @@ void AdvancedFm::filePerms()
delete filePerm;
}
- PopulateView();
+ populateView();
}
@@ -294,5 +294,5 @@ void AdvancedFm::upDir()
thisDir->cd( current, TRUE);
- PopulateView();
+ populateView();
update();
}
@@ -361,7 +361,6 @@ void AdvancedFm::copy()
}
}
-
- PopulateView();
-// TabWidget->setCurrentTab(1);
+ setOtherTabCurrent();
+ populateView();
}
}
@@ -418,5 +417,6 @@ void AdvancedFm::copyAs()
}
- PopulateView();
+ setOtherTabCurrent();
+ populateView();
}
@@ -471,5 +471,5 @@ void AdvancedFm::copySameDir()
delete fileDlg;
}
- PopulateView();
+ populateView();
}
@@ -513,6 +513,7 @@ void AdvancedFm::move()
}
- populateRemoteView();
- populateLocalView();
+ setOtherTabCurrent();
+ populateView();
+// populateLocalView();
}
@@ -644,50 +645,30 @@ void AdvancedFm::mkSym()
if( curFileList.count() > 0)
{
- if ( whichTab == 1)
- {
- for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it )
- {
+ QDir *thisDir = CurrentDir();
+ QDir * thatDir = OtherDir();
- 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);
- startProcess( (const QString)cmd );
- }
- populateRemoteView();
- TabWidget->setCurrentTab(1);
- }
- else
+ for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it )
{
- for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it )
+
+ QString destName = thatDir->canonicalPath()+"/"+(*it);
+ if(destName.right(1) == "/")
{
+ destName = destName.left( destName.length() -1);
+ }
- 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);
- }
+ QString curFile = thisDir->canonicalPath()+"/"+(*it);
- cmd = "ln -s "+curFile+" "+destName;
- qDebug(cmd);
- startProcess( (const QString)cmd );
- }
- populateLocalView();
- TabWidget->setCurrentTab(0);
- }
- }
+ if( curFile.right(1) == "/")
+ {
+ curFile = curFile.left( curFile.length() -1);
+ }
+
+ cmd = "ln -s "+curFile+" "+destName;
+ qDebug(cmd);
+ startProcess( (const QString)cmd );
+ }
+ setOtherTabCurrent();
+ populateView();
+ }
}
@@ -700,5 +681,4 @@ void AdvancedFm::doBeam()
else
{
-
QStringList curFileList = getPath();
if( curFileList.count() > 0)
@@ -756,6 +736,6 @@ void AdvancedFm::startProcess(const QString & cmd)
void AdvancedFm::processEnded()
{
- populateLocalView();
- populateRemoteView();
+// populateLocalView();
+ populateView();
}
@@ -844,5 +824,5 @@ void AdvancedFm::renameIt()
oldName = thisView->currentItem()->text(0);
doRename( thisView );
- PopulateView();
+ populateView();
}
@@ -866,4 +846,4 @@ void AdvancedFm::okRename()
view->takeItem( view->currentItem() );
delete view->currentItem();
- PopulateView();
+ populateView();
}