summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp87
-rw-r--r--noncore/apps/advancedfm/advancedfm.h2
2 files changed, 24 insertions, 65 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
@@ -44,7 +44,7 @@ AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags )
44 unknownXpm = Resource::loadImage("UnknownDocument").smoothScale(AppLnk::smallIconSize(),AppLnk::smallIconSize() ); 44 unknownXpm = Resource::loadImage("UnknownDocument").smoothScale(AppLnk::smallIconSize(),AppLnk::smallIconSize() );
45 45
46 initConnections(); 46 initConnections();
47 populateView(); 47 rePopulate();
48 channel = new QCopChannel( "QPE/Application/advancedfm", this ); 48 channel = new QCopChannel( "QPE/Application/advancedfm", this );
49 connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&))); 49 connect(channel,SIGNAL(received(const QCString&,const QByteArray&)),this,SLOT(qcopReceive(const QCString&,const QByteArray&)));
50 switchToLocalTab(); 50 switchToLocalTab();
@@ -374,92 +374,51 @@ void AdvancedFm::doAbout() {
374} 374}
375 375
376void AdvancedFm::keyPressEvent( QKeyEvent *e) { 376void AdvancedFm::keyPressEvent( QKeyEvent *e) {
377// owarn << "key " << e->key() << "" << oendl; 377 if( e->key() == Key_Left )
378// if( CurrentView()->hasFocus() )
379 {
380 switch ( e->key() ) {
381 case Key_Left:
382 upDir(); 378 upDir();
383 break; 379 else if( e->key() == Key_Return || e->key() == Key_Enter)
384 case Key_Next:
385 break;
386 case Key_Return:
387 case Key_Enter:
388 navigateToSelected(); 380 navigateToSelected();
389 break; 381 else if( e->key() == Key_Tab)
390 case Key_Tab: {
391 setOtherTabCurrent(); 382 setOtherTabCurrent();
392 } 383 else if( e->key() == Key_Delete )
393 break;
394 case Key_Delete:
395 del(); 384 del();
396 break; 385 else if( e->key() == Key_A)
397 case Key_A:
398 copyAs(); 386 copyAs();
399 break; 387 else if( e->key() == Key_C)
400 case Key_C:
401 copy(); 388 copy();
402 break; 389 else if( e->key() == Key_E)
403 case Key_E:
404 runThis(); 390 runThis();
405 break; 391 else if( e->key() == Key_G)
406 case Key_G:
407 {
408 currentPathCombo->lineEdit()->setFocus(); 392 currentPathCombo->lineEdit()->setFocus();
409 } 393 else if( e->key() == Key_H )
410 break;
411
412 case Key_H:
413 showHidden(); 394 showHidden();
414 break; 395 else if( e->key() == Key_I)
415 case Key_I:
416 fileStatus(); 396 fileStatus();
417 break; 397 else if( e->key() == Key_M)
418 case Key_M:
419 move(); 398 move();
420 break; 399 else if( e->key() == Key_N )
421 case Key_N:
422 mkDir(); 400 mkDir();
423 break; 401 else if( e->key() == Key_P)
424 case Key_P:
425 filePerms(); 402 filePerms();
426 break; 403 else if( e->key() == Key_R )
427 case Key_R:
428 rn(); 404 rn();
429 break; 405 else if( e->key() == Key_U )
430 case Key_U:
431 upDir(); 406 upDir();
432 break; 407 else if( e->key() == Key_1)
433 case Key_1:
434 switchToLocalTab(); 408 switchToLocalTab();
435 break; 409 else if( e->key() == Key_2)
436 case Key_2:
437 switchToRemoteTab(); 410 switchToRemoteTab();
438 break; 411 else if( e->key() == Key_3)
439 case Key_3:
440 CFButtonPushed(); 412 CFButtonPushed();
441 break; 413 else if( e->key() == Key_4)
442 case Key_4:
443 SDButtonPushed(); 414 SDButtonPushed();
444 break; 415 else if( e->key() == Key_5 )
445 case Key_5:
446 homeButtonPushed(); 416 homeButtonPushed();
447 break; 417 else if( e->key() == Key_6 )
448 case Key_6:
449 docButtonPushed(); 418 docButtonPushed();
450 break; 419 else
451 case Key_7:
452 break;
453 case Key_8:
454 break;
455 case Key_9:
456 break;
457 case Key_0:
458 break;
459 };
460 e->accept(); 420 e->accept();
461 } 421 }
462}
463 422
464void AdvancedFm::keyReleaseEvent( QKeyEvent *e) { 423void AdvancedFm::keyReleaseEvent( QKeyEvent *e) {
465 if( CurrentView()->hasFocus() ) 424 if( CurrentView()->hasFocus() )
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
@@ -97,7 +97,7 @@ protected:
97 QListView *CurrentView(); 97 QListView *CurrentView();
98 QListView *OtherView(); 98 QListView *OtherView();
99 void setOtherTabCurrent(); 99 void setOtherTabCurrent();
100 void changeTo(QString & dir); 100 void changeTo(QString dir);
101 101
102//protected signals: 102//protected signals:
103 // void newPath(QString); 103 // void newPath(QString);