Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index d7bad51..b6e7a30 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -723,38 +723,41 @@ void AdvancedFm::showFileMenu() { | |||
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 | const AppLnk* app = mt.application(); | ||
729 | QFile fi(curApp); | ||
730 | |||
731 | QPopupMenu *m = new QPopupMenu(0); | ||
732 | QPopupMenu *n = new QPopupMenu(0); | ||
733 | // QPopupMenu *o = new QPopupMenu(0); | ||
734 | |||
735 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | ||
736 | if ( !QFileInfo(fi).isDir() ) { | ||
737 | // m->insertSeparator(); | ||
738 | // m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); | ||
739 | // } else { | ||
740 | |||
741 | if ( app ) | ||
742 | m->insertItem( app->pixmap(), tr( "Open in " | ||
743 | + app->name() ), this, SLOT( runThis() ) ); | ||
744 | else if( QFileInfo(fi).isExecutable() ) | ||
745 | m->insertItem( Resource::loadPixmap( app->name()), tr( "Execute" ), this, SLOT( runThis() ) ); | ||
746 | |||
747 | m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); | ||
748 | } | ||
749 | 728 | ||
750 | m->insertItem(tr("Actions"),n); | 729 | const AppLnk* app = mt.application(); |
751 | if(isLocalView) | ||
752 | n->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | ||
753 | else | ||
754 | n->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | ||
755 | 730 | ||
756 | n->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); | 731 | QFile fi(curApp); |
732 | |||
733 | QPopupMenu *m = new QPopupMenu(0); | ||
734 | QPopupMenu *n = new QPopupMenu(0); | ||
735 | // QPopupMenu *o = new QPopupMenu(0); | ||
736 | |||
737 | m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); | ||
738 | |||
739 | if ( QFileInfo(fi).isDir() ) { | ||
740 | m->insertSeparator(); | ||
741 | m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); | ||
742 | } else { | ||
743 | |||
744 | if ( app ) | ||
745 | m->insertItem( app->pixmap(), tr( "Open in " | ||
746 | + app->name() ), this, SLOT( runThis() ) ); | ||
747 | else if( QFileInfo(fi).isExecutable() ) //damn opie doesnt like this | ||
748 | m->insertItem( /*Resource::loadPixmap( app->name()),*/ tr( "Execute" ), this, SLOT( runThis() ) ); | ||
749 | |||
750 | m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); | ||
751 | } | ||
752 | |||
753 | m->insertItem(tr("Actions"),n); | ||
754 | if(isLocalView) | ||
755 | n->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); | ||
756 | else | ||
757 | n->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); | ||
758 | |||
759 | n->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); | ||
757 | 760 | ||
758 | n->insertSeparator(); | 761 | n->insertSeparator(); |
759 | 762 | ||
760 | 763 | ||