author | llornkcor <llornkcor> | 2002-10-16 15:48:52 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-10-16 15:48:52 (UTC) |
commit | 0176ce245c348baf392dba790878458a5e39077f (patch) (unidiff) | |
tree | 91665a3e143c14d3a785d1c660df88e2aafde9fc /noncore/apps/advancedfm/advancedfm.cpp | |
parent | 321cea04e34658fde3de47c104682b5cefce6eeb (diff) | |
download | opie-0176ce245c348baf392dba790878458a5e39077f.zip opie-0176ce245c348baf392dba790878458a5e39077f.tar.gz opie-0176ce245c348baf392dba790878458a5e39077f.tar.bz2 |
fix showhidden files handling
Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index b6e7a30..f23fd86 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -716,46 +716,41 @@ QString AdvancedFm::getDiskSpace( const QString &path) { | |||
716 | void AdvancedFm::showFileMenu() { | 716 | void AdvancedFm::showFileMenu() { |
717 | 717 | ||
718 | QString curApp; | 718 | QString curApp; |
719 | bool isLocalView = false; | 719 | bool isLocalView = false; |
720 | if (TabWidget->currentPageIndex() == 0) { | 720 | if (TabWidget->currentPageIndex() == 0) { |
721 | isLocalView = TRUE; | 721 | isLocalView = TRUE; |
722 | curApp = Local_View->currentItem()->text(0); | 722 | curApp = Local_View->currentItem()->text(0); |
723 | } else { | 723 | } else { |
724 | curApp = Remote_View->currentItem()->text(0); | 724 | curApp = Remote_View->currentItem()->text(0); |
725 | } | 725 | } |
726 | 726 | ||
727 | MimeType mt( curApp ); | 727 | MimeType mt( curApp ); |
728 | |||
729 | const AppLnk* app = mt.application(); | 728 | const AppLnk* app = mt.application(); |
730 | |||
731 | QFile fi(curApp); | 729 | QFile fi(curApp); |
732 | |||
733 | QPopupMenu *m = new QPopupMenu(0); | 730 | QPopupMenu *m = new QPopupMenu(0); |
734 | QPopupMenu *n = new QPopupMenu(0); | 731 | QPopupMenu *n = new QPopupMenu(0); |
735 | // QPopupMenu *o = new QPopupMenu(0); | 732 | // QPopupMenu *o = new QPopupMenu(0); |
736 | 733 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() )); | |
737 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | ||
738 | 734 | ||
739 | if ( QFileInfo(fi).isDir() ) { | 735 | if ( QFileInfo(fi).isDir() ) { |
740 | m->insertSeparator(); | 736 | m->insertSeparator(); |
741 | m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); | 737 | m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); |
742 | } else { | 738 | } else { |
743 | 739 | ||
744 | if ( app ) | 740 | if ( app ) |
745 | m->insertItem( app->pixmap(), tr( "Open in " | 741 | m->insertItem( app->pixmap(), tr( "Open in " |
746 | + app->name() ), this, SLOT( runThis() ) ); | 742 | + app->name() ), this, SLOT( runThis() ) ); |
747 | else if( QFileInfo(fi).isExecutable() ) //damn opie doesnt like this | 743 | else if( QFileInfo(fi).isExecutable() ) //damn opie doesnt like this |
748 | m->insertItem( /*Resource::loadPixmap( app->name()),*/ tr( "Execute" ), this, SLOT( runThis() ) ); | 744 | m->insertItem( tr( "Execute" ), this, SLOT( runThis() ) ); |
749 | |||
750 | m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); | 745 | m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); |
751 | } | 746 | } |
752 | 747 | ||
753 | m->insertItem(tr("Actions"),n); | 748 | m->insertItem(tr("Actions"),n); |
754 | if(isLocalView) | 749 | if(isLocalView) |
755 | n->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | 750 | n->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); |
756 | else | 751 | else |
757 | n->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | 752 | n->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); |
758 | 753 | ||
759 | n->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); | 754 | n->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); |
760 | 755 | ||
761 | n->insertSeparator(); | 756 | n->insertSeparator(); |