summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm
Side-by-side diff
Diffstat (limited to 'noncore/apps/advancedfm') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp59
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
@@ -724,36 +724,39 @@ void AdvancedFm::showFileMenu() {
curApp = Remote_View->currentItem()->text(0);
}
- MimeType mt( curApp );
- const AppLnk* app = mt.application();
- QFile fi(curApp);
-
- QPopupMenu *m = new QPopupMenu(0);
- QPopupMenu *n = new QPopupMenu(0);
-// QPopupMenu *o = new QPopupMenu(0);
-
- m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
- if ( !QFileInfo(fi).isDir() ) {
-// m->insertSeparator();
-// m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() ));
-// } else {
-
- if ( app )
- m->insertItem( app->pixmap(), tr( "Open in "
- + app->name() ), this, SLOT( runThis() ) );
- else if( QFileInfo(fi).isExecutable() )
- m->insertItem( Resource::loadPixmap( app->name()), tr( "Execute" ), this, SLOT( runThis() ) );
-
- m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) );
- }
+ MimeType mt( curApp );
- m->insertItem(tr("Actions"),n);
- if(isLocalView)
- n->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
- else
- n->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
+ const AppLnk* app = mt.application();
- n->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() ));
+ QFile fi(curApp);
+
+ QPopupMenu *m = new QPopupMenu(0);
+ QPopupMenu *n = new QPopupMenu(0);
+ // QPopupMenu *o = new QPopupMenu(0);
+
+ m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
+
+ if ( QFileInfo(fi).isDir() ) {
+ m->insertSeparator();
+ m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() ));
+ } else {
+
+ if ( app )
+ m->insertItem( app->pixmap(), tr( "Open in "
+ + app->name() ), this, SLOT( runThis() ) );
+ else if( QFileInfo(fi).isExecutable() ) //damn opie doesnt like this
+ m->insertItem( /*Resource::loadPixmap( app->name()),*/ tr( "Execute" ), this, SLOT( runThis() ) );
+
+ m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) );
+ }
+
+ m->insertItem(tr("Actions"),n);
+ if(isLocalView)
+ n->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
+ else
+ n->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
+
+ n->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() ));
n->insertSeparator();