summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp
index 73d0d57..48332b7 100644
--- a/noncore/apps/advancedfm/advancedfm.cpp
+++ b/noncore/apps/advancedfm/advancedfm.cpp
@@ -361,32 +361,39 @@ void AdvancedFm::SDButtonPushed() {
361 changeTo("/mnt/card");// this can change so fix 361 changeTo("/mnt/card");// this can change so fix
362} 362}
363 363
364void AdvancedFm::CFButtonPushed() { 364void AdvancedFm::CFButtonPushed() {
365 if(zaurusDevice) 365 if(zaurusDevice)
366 changeTo("/mnt/cf"); //zaurus 366 changeTo("/mnt/cf"); //zaurus
367 else 367 else
368 changeTo("/mnt/hda"); //ipaq 368 changeTo("/mnt/hda"); //ipaq
369} 369}
370 370
371 371
372void AdvancedFm::doAbout() { 372void AdvancedFm::doAbout() {
373 QMessageBox::message("AdvancedFm",tr("<P>Advanced FileManager is copyright 2002-2003 by L.J.Potter<llornkcor@handhelds.org> and is licensed by the GPL</P>")); 373 QMessageBox::message("AdvancedFm",tr("<P>Advanced FileManager is copyright 2002-2003 by L.J.Potter<llornkcor@handhelds.org> and is licensed by the GPL</P>"));
374} 374}
375 375
376void AdvancedFm::keyPressEvent( QKeyEvent *e) { 376void AdvancedFm::keyPressEvent( QKeyEvent *e) {
377 qDebug("keypressevent");
378}
379
380void AdvancedFm::keyReleaseEvent( QKeyEvent *e) {
381 qDebug("key release");
382 if( CurrentView()->hasFocus() )
383 e->ignore();
377 if( e->key() == Key_Left ) 384 if( e->key() == Key_Left )
378 upDir(); 385 upDir();
379 else if( e->key() == Key_Return || e->key() == Key_Enter) 386 else if( e->key() == Key_Return || e->key() == Key_Enter)
380 navigateToSelected(); 387 navigateToSelected();
381 else if( e->key() == Key_Tab) 388 else if( e->key() == Key_Tab)
382 setOtherTabCurrent(); 389 setOtherTabCurrent();
383 else if( e->key() == Key_Delete ) 390 else if( e->key() == Key_Delete )
384 del(); 391 del();
385 else if( e->key() == Key_A) 392 else if( e->key() == Key_A)
386 copyAs(); 393 copyAs();
387 else if( e->key() == Key_C) 394 else if( e->key() == Key_C)
388 copy(); 395 copy();
389 else if( e->key() == Key_E) 396 else if( e->key() == Key_E)
390 runThis(); 397 runThis();
391 else if( e->key() == Key_G) 398 else if( e->key() == Key_G)
392 currentPathCombo->lineEdit()->setFocus(); 399 currentPathCombo->lineEdit()->setFocus();
@@ -407,37 +414,32 @@ void AdvancedFm::keyPressEvent( QKeyEvent *e) {
407 else if( e->key() == Key_1) 414 else if( e->key() == Key_1)
408 switchToLocalTab(); 415 switchToLocalTab();
409 else if( e->key() == Key_2) 416 else if( e->key() == Key_2)
410 switchToRemoteTab(); 417 switchToRemoteTab();
411 else if( e->key() == Key_3) 418 else if( e->key() == Key_3)
412 CFButtonPushed(); 419 CFButtonPushed();
413 else if( e->key() == Key_4) 420 else if( e->key() == Key_4)
414 SDButtonPushed(); 421 SDButtonPushed();
415 else if( e->key() == Key_5 ) 422 else if( e->key() == Key_5 )
416 homeButtonPushed(); 423 homeButtonPushed();
417 else if( e->key() == Key_6 ) 424 else if( e->key() == Key_6 )
418 docButtonPushed(); 425 docButtonPushed();
419 else 426 else
420 e->accept(); 427 e->accept();
421} 428}
422 429
423void AdvancedFm::keyReleaseEvent( QKeyEvent *e) {
424 if( CurrentView()->hasFocus() )
425 e->ignore();
426}
427
428 430
429void AdvancedFm::QPEButtonPushed() { 431void AdvancedFm::QPEButtonPushed() {
430 QString current = QPEApplication::qpeDir(); 432 QString current = QPEApplication::qpeDir();
431 chdir( current.latin1() ); 433 chdir( current.latin1() );
432 CurrentDir()->cd( current, TRUE); 434 CurrentDir()->cd( current, TRUE);
433 populateView(); 435 populateView();
434 update(); 436 update();
435} 437}
436 438
437void AdvancedFm::parsetab(const QString &fileName) { 439void AdvancedFm::parsetab(const QString &fileName) {
438 440
439 fileSystemTypeList.clear(); 441 fileSystemTypeList.clear();
440 fsList.clear(); 442 fsList.clear();
441 struct mntent *me; 443 struct mntent *me;
442 FILE *mntfp = setmntent( fileName.latin1(), "r" ); 444 FILE *mntfp = setmntent( fileName.latin1(), "r" );
443 if ( mntfp ) { 445 if ( mntfp ) {