-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 48332b7..9cb9aba 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -355,32 +355,35 @@ void AdvancedFm::homeButtonPushed() { | |||
355 | 355 | ||
356 | void AdvancedFm::docButtonPushed() { | 356 | void AdvancedFm::docButtonPushed() { |
357 | changeTo(QPEApplication::documentDir()); | 357 | changeTo(QPEApplication::documentDir()); |
358 | } | 358 | } |
359 | 359 | ||
360 | void AdvancedFm::SDButtonPushed() { | 360 | 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 | ||
364 | void AdvancedFm::CFButtonPushed() { | 364 | void 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 | void AdvancedFm::QPEButtonPushed() { | ||
372 | changeTo(QPEApplication::qpeDir()); | ||
373 | } | ||
371 | 374 | ||
372 | void AdvancedFm::doAbout() { | 375 | void 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>")); | 376 | 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 | } | 377 | } |
375 | 378 | ||
376 | void AdvancedFm::keyPressEvent( QKeyEvent *e) { | 379 | void AdvancedFm::keyPressEvent( QKeyEvent *e) { |
377 | qDebug("keypressevent"); | 380 | qDebug("keypressevent"); |
378 | } | 381 | } |
379 | 382 | ||
380 | void AdvancedFm::keyReleaseEvent( QKeyEvent *e) { | 383 | void AdvancedFm::keyReleaseEvent( QKeyEvent *e) { |
381 | qDebug("key release"); | 384 | qDebug("key release"); |
382 | if( CurrentView()->hasFocus() ) | 385 | if( CurrentView()->hasFocus() ) |
383 | e->ignore(); | 386 | e->ignore(); |
384 | if( e->key() == Key_Left ) | 387 | if( e->key() == Key_Left ) |
385 | upDir(); | 388 | upDir(); |
386 | else if( e->key() == Key_Return || e->key() == Key_Enter) | 389 | else if( e->key() == Key_Return || e->key() == Key_Enter) |
@@ -415,40 +418,32 @@ void AdvancedFm::keyReleaseEvent( QKeyEvent *e) { | |||
415 | switchToLocalTab(); | 418 | switchToLocalTab(); |
416 | else if( e->key() == Key_2) | 419 | else if( e->key() == Key_2) |
417 | switchToRemoteTab(); | 420 | switchToRemoteTab(); |
418 | else if( e->key() == Key_3) | 421 | else if( e->key() == Key_3) |
419 | CFButtonPushed(); | 422 | CFButtonPushed(); |
420 | else if( e->key() == Key_4) | 423 | else if( e->key() == Key_4) |
421 | SDButtonPushed(); | 424 | SDButtonPushed(); |
422 | else if( e->key() == Key_5 ) | 425 | else if( e->key() == Key_5 ) |
423 | homeButtonPushed(); | 426 | homeButtonPushed(); |
424 | else if( e->key() == Key_6 ) | 427 | else if( e->key() == Key_6 ) |
425 | docButtonPushed(); | 428 | docButtonPushed(); |
426 | else | 429 | else |
427 | e->accept(); | 430 | e->accept(); |
428 | } | 431 | } |
429 | 432 | ||
430 | 433 | ||
431 | void AdvancedFm::QPEButtonPushed() { | ||
432 | QString current = QPEApplication::qpeDir(); | ||
433 | chdir( current.latin1() ); | ||
434 | CurrentDir()->cd( current, TRUE); | ||
435 | populateView(); | ||
436 | update(); | ||
437 | } | ||
438 | |||
439 | void AdvancedFm::parsetab(const QString &fileName) { | 434 | void AdvancedFm::parsetab(const QString &fileName) { |
440 | 435 | ||
441 | fileSystemTypeList.clear(); | 436 | fileSystemTypeList.clear(); |
442 | fsList.clear(); | 437 | fsList.clear(); |
443 | struct mntent *me; | 438 | struct mntent *me; |
444 | FILE *mntfp = setmntent( fileName.latin1(), "r" ); | 439 | FILE *mntfp = setmntent( fileName.latin1(), "r" ); |
445 | if ( mntfp ) { | 440 | if ( mntfp ) { |
446 | while ( (me = getmntent( mntfp )) != 0 ) { | 441 | while ( (me = getmntent( mntfp )) != 0 ) { |
447 | QString deviceName = me->mnt_fsname; | 442 | QString deviceName = me->mnt_fsname; |
448 | QString filesystemType = me->mnt_type; | 443 | QString filesystemType = me->mnt_type; |
449 | QString mountDir = me->mnt_dir; | 444 | QString mountDir = me->mnt_dir; |
450 | if(deviceName != "none") { | 445 | if(deviceName != "none") { |
451 | if( fsList.contains(filesystemType) == 0 | 446 | if( fsList.contains(filesystemType) == 0 |
452 | & filesystemType.find("proc",0,TRUE) == -1 | 447 | & filesystemType.find("proc",0,TRUE) == -1 |
453 | & filesystemType.find("cramfs",0,TRUE) == -1 | 448 | & filesystemType.find("cramfs",0,TRUE) == -1 |
454 | & filesystemType.find("auto",0,TRUE) == -1) | 449 | & filesystemType.find("auto",0,TRUE) == -1) |