-rw-r--r-- | core/apps/textedit/fileBrowser.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/core/apps/textedit/fileBrowser.cpp b/core/apps/textedit/fileBrowser.cpp index acd50c2..ebb78d1 100644 --- a/core/apps/textedit/fileBrowser.cpp +++ b/core/apps/textedit/fileBrowser.cpp @@ -21,2 +21,3 @@ #include <qpe/menubutton.h> +#include <qpe/mimetype.h> @@ -198,3 +199,2 @@ void fileBrowser::populateList() QPixmap pm; - pm= Resource::loadPixmap( "folder" ); @@ -203,2 +203,4 @@ void fileBrowser::populateList() pm = Resource::loadPixmap( "lockedfolder" ); + else + pm= Resource::loadPixmap( "folder" ); item->setPixmap( 0,pm ); @@ -207,8 +209,13 @@ void fileBrowser::populateList() pm = Resource::loadPixmap( "locked" ); - else - pm = Resource::loadPixmap( "fileopen" ); + else { + MimeType mt(fi->filePath()); + pm=mt.pixmap(); + if(pm.isNull()) + pm = Resource::loadPixmap( "UnknownDocument-14" ); item->setPixmap( 0,pm); } + } if( fileL.find("->",0,TRUE) != -1) { // overlay link image + pm= Resource::loadPixmap( "folder" ); QPixmap lnk = Resource::loadPixmap( "symlink" ); |