author | llornkcor <llornkcor> | 2002-10-16 15:17:00 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-10-16 15:17:00 (UTC) |
commit | 61f2f6ef32685002710f197dc8990fd9e99d83a5 (patch) (side-by-side diff) | |
tree | 5fa57efbff0e83a326f6e055c3c59be71d4328bd | |
parent | ee8da0d0b70318c24ee2417bbccd9b7cd6e1404e (diff) | |
download | opie-61f2f6ef32685002710f197dc8990fd9e99d83a5.zip opie-61f2f6ef32685002710f197dc8990fd9e99d83a5.tar.gz opie-61f2f6ef32685002710f197dc8990fd9e99d83a5.tar.bz2 |
fix for popup menu crash.. didnt like loading executable pixmap
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 15 |
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 @@ -727,3 +727,5 @@ void AdvancedFm::showFileMenu() { MimeType mt( curApp ); + const AppLnk* app = mt.application(); + QFile fi(curApp); @@ -735,6 +737,7 @@ void AdvancedFm::showFileMenu() { 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 ( QFileInfo(fi).isDir() ) { + m->insertSeparator(); + m->insertItem( tr( "Change Directory" ), this, SLOT( doLocalCd() )); + } else { @@ -743,4 +746,4 @@ void AdvancedFm::showFileMenu() { + app->name() ), this, SLOT( runThis() ) ); - else if( QFileInfo(fi).isExecutable() ) - m->insertItem( Resource::loadPixmap( app->name()), tr( "Execute" ), this, SLOT( runThis() ) ); + else if( QFileInfo(fi).isExecutable() ) //damn opie doesnt like this + m->insertItem( /*Resource::loadPixmap( app->name()),*/ tr( "Execute" ), this, SLOT( runThis() ) ); |