summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-09-25 04:38:48 (UTC)
committer llornkcor <llornkcor>2004-09-25 04:38:48 (UTC)
commit4eab17fb1381c938188e13ec5025b8302b159c9e (patch) (side-by-side diff)
treebb8d1c5e52e59d8e1683da3dab08d20177e684f7
parent037acb8741eabb71693104f7807ffd848ac4d1f9 (diff)
downloadopie-4eab17fb1381c938188e13ec5025b8302b159c9e.zip
opie-4eab17fb1381c938188e13ec5025b8302b159c9e.tar.gz
opie-4eab17fb1381c938188e13ec5025b8302b159c9e.tar.bz2
opti function and fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp133
-rw-r--r--noncore/apps/advancedfm/advancedfm.h2
2 files changed, 47 insertions, 88 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index fec320d..73d0d57 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -46,6 +46,6 @@ AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags )
initConnections();
- populateView();
+ rePopulate();
channel = new QCopChannel( "QPE/Application/advancedfm", this );
connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&)));
- switchToLocalTab();
+ switchToLocalTab();
}
@@ -376,87 +376,46 @@ void AdvancedFm::doAbout() {
void AdvancedFm::keyPressEvent( QKeyEvent *e) {
-// owarn << "key " << e->key() << "" << oendl;
-// if( CurrentView()->hasFocus() )
- {
- switch ( e->key() ) {
- case Key_Left:
- upDir();
- break;
- case Key_Next:
- break;
- case Key_Return:
- case Key_Enter:
- navigateToSelected();
- break;
- case Key_Tab: {
- setOtherTabCurrent();
- }
- break;
- case Key_Delete:
- del();
- break;
- case Key_A:
- copyAs();
- break;
- case Key_C:
- copy();
- break;
- case Key_E:
- runThis();
- break;
- case Key_G:
- {
- currentPathCombo->lineEdit()->setFocus();
- }
- break;
-
- case Key_H:
- showHidden();
- break;
- case Key_I:
- fileStatus();
- break;
- case Key_M:
- move();
- break;
- case Key_N:
- mkDir();
- break;
- case Key_P:
- filePerms();
- break;
- case Key_R:
- rn();
- break;
- case Key_U:
- upDir();
- break;
- case Key_1:
- switchToLocalTab();
- break;
- case Key_2:
- switchToRemoteTab();
- break;
- case Key_3:
- CFButtonPushed();
- break;
- case Key_4:
- SDButtonPushed();
- break;
- case Key_5:
- homeButtonPushed();
- break;
- case Key_6:
- docButtonPushed();
- break;
- case Key_7:
- break;
- case Key_8:
- break;
- case Key_9:
- break;
- case Key_0:
- break;
- };
- e->accept();
- }
+ if( e->key() == Key_Left )
+ upDir();
+ else if( e->key() == Key_Return || e->key() == Key_Enter)
+ navigateToSelected();
+ else if( e->key() == Key_Tab)
+ setOtherTabCurrent();
+ else if( e->key() == Key_Delete )
+ del();
+ else if( e->key() == Key_A)
+ copyAs();
+ else if( e->key() == Key_C)
+ copy();
+ else if( e->key() == Key_E)
+ runThis();
+ else if( e->key() == Key_G)
+ currentPathCombo->lineEdit()->setFocus();
+ else if( e->key() == Key_H )
+ showHidden();
+ else if( e->key() == Key_I)
+ fileStatus();
+ else if( e->key() == Key_M)
+ move();
+ else if( e->key() == Key_N )
+ mkDir();
+ else if( e->key() == Key_P)
+ filePerms();
+ else if( e->key() == Key_R )
+ rn();
+ else if( e->key() == Key_U )
+ upDir();
+ else if( e->key() == Key_1)
+ switchToLocalTab();
+ else if( e->key() == Key_2)
+ switchToRemoteTab();
+ else if( e->key() == Key_3)
+ CFButtonPushed();
+ else if( e->key() == Key_4)
+ SDButtonPushed();
+ else if( e->key() == Key_5 )
+ homeButtonPushed();
+ else if( e->key() == Key_6 )
+ docButtonPushed();
+ else
+ e->accept();
}
diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h
index c52b853..b109364 100644
--- a/noncore/apps/advancedfm/advancedfm.h
+++ b/noncore/apps/advancedfm/advancedfm.h
@@ -99,3 +99,3 @@ protected:
void setOtherTabCurrent();
- void changeTo(QString & dir);
+ void changeTo(QString dir);