summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-10-16 15:17:00 (UTC)
committer llornkcor <llornkcor>2002-10-16 15:17:00 (UTC)
commit61f2f6ef32685002710f197dc8990fd9e99d83a5 (patch) (unidiff)
tree5fa57efbff0e83a326f6e055c3c59be71d4328bd
parentee8da0d0b70318c24ee2417bbccd9b7cd6e1404e (diff)
downloadopie-61f2f6ef32685002710f197dc8990fd9e99d83a5.zip
opie-61f2f6ef32685002710f197dc8990fd9e99d83a5.tar.gz
opie-61f2f6ef32685002710f197dc8990fd9e99d83a5.tar.bz2
fix for popup menu crash.. didnt like loading executable pixmap
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfm.cpp15
1 files changed, 9 insertions, 6 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
@@ -725,7 +725,9 @@ void AdvancedFm::showFileMenu() {
725 } 725 }
726 726
727 MimeType mt( curApp ); 727 MimeType mt( curApp );
728
728 const AppLnk* app = mt.application(); 729 const AppLnk* app = mt.application();
730
729 QFile fi(curApp); 731 QFile fi(curApp);
730 732
731 QPopupMenu *m = new QPopupMenu(0); 733 QPopupMenu *m = new QPopupMenu(0);
@@ -733,16 +735,17 @@ void AdvancedFm::showFileMenu() {
733// QPopupMenu *o = new QPopupMenu(0); 735// QPopupMenu *o = new QPopupMenu(0);
734 736
735 m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); 737 m->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
736 if ( !QFileInfo(fi).isDir() ) { 738
737// m->insertSeparator(); 739 if ( QFileInfo(fi).isDir() ) {
738// m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); 740 m->insertSeparator();
739// } else { 741 m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() ));
742 } else {
740 743
741 if ( app ) 744 if ( app )
742 m->insertItem( app->pixmap(), tr( "Open in " 745 m->insertItem( app->pixmap(), tr( "Open in "
743 + app->name() ), this, SLOT( runThis() ) ); 746 + app->name() ), this, SLOT( runThis() ) );
744 else if( QFileInfo(fi).isExecutable() ) 747 else if( QFileInfo(fi).isExecutable() ) //damn opie doesnt like this
745 m->insertItem( Resource::loadPixmap( app->name()), tr( "Execute" ), this, SLOT( runThis() ) ); 748 m->insertItem( /*Resource::loadPixmap( app->name()),*/ tr( "Execute" ), this, SLOT( runThis() ) );
746 749
747 m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) ); 750 m->insertItem( Resource::loadPixmap( "txt" ), tr( "Open as text" ),this, SLOT( runText() ) );
748 } 751 }