summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp37
-rw-r--r--noncore/apps/advancedfm/advancedfm.h4
2 files changed, 34 insertions, 7 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 1083f23..4289fcf 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -118,13 +118,14 @@ AdvancedFm::AdvancedFm( )
// fileMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() ));
fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
+ fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
fileMenu->insertSeparator();
- fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
- fileMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() ));
+ fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() ));
+ fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() ));
fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() ));
fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() ));
fileMenu->insertSeparator();
- fileMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() ));
+ fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() ));
fileMenu->setCheckable(TRUE);
viewMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() ));
@@ -201,13 +202,14 @@ AdvancedFm::AdvancedFm( )
// TabWidget->insertTab( tab_3, tr( "Files" ) );
- currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
+ currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
currentDir.setPath( QDir::currentDirPath());
- currentRemoteDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
+ currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
currentRemoteDir.setPath( QDir::currentDirPath());
- currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" );
+b = TRUE;
+ currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" );
currentPathCombo->setEditable(TRUE);
layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 6);
currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
@@ -1262,6 +1264,29 @@ void AdvancedFm::fileStatus() {
}
}
+void AdvancedFm::mkDir() {
+ if (TabWidget->currentPageIndex() == 0)
+ localMakDir();
+ else
+ remoteMakDir();
+
+}
+
+void AdvancedFm::rn() {
+ if (TabWidget->currentPageIndex() == 0)
+ localRename();
+ else
+ remoteRename();
+
+}
+
+void AdvancedFm::del() {
+ if (TabWidget->currentPageIndex() == 0)
+ localDelete();
+ else
+ remoteDelete();
+}
+
void AdvancedFm::doAbout() {
QMessageBox::message("AdvancedFm","Advanced FileManager\n"
"is copyright 2002 by\n"
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index 30ff28c..a5f26a7 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -64,7 +64,9 @@ protected slots:
void doLocalCd();
void doRemoteCd();
// void copy();
-
+ void mkDir();
+ void del();
+ void rn();
void populateLocalView();
void populateRemoteView();
void showHidden();