summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-03-25 02:46:56 (UTC)
committer llornkcor <llornkcor>2002-03-25 02:46:56 (UTC)
commitb43c59f2f8da6edfa37042e0838b38702636f4d1 (patch) (unidiff)
tree31913b2d26759d404c570c2164949da5b0796027
parentd8820a9f2bdf9bc98c99542e3613ca9b5d2c6e0c (diff)
downloadopie-b43c59f2f8da6edfa37042e0838b38702636f4d1.zip
opie-b43c59f2f8da6edfa37042e0838b38702636f4d1.tar.gz
opie-b43c59f2f8da6edfa37042e0838b38702636f4d1.tar.bz2
added more icon stuff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/apps/textedit/fileBrowser.cpp13
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
@@ -19,6 +19,7 @@
19#include <qpe/fileselector.h> 19#include <qpe/fileselector.h>
20#include <qpe/qpeapplication.h> 20#include <qpe/qpeapplication.h>
21#include <qpe/menubutton.h> 21#include <qpe/menubutton.h>
22#include <qpe/mimetype.h>
22 23
23#include <qdict.h> 24#include <qdict.h>
24#include <qwidgetstack.h> 25#include <qwidgetstack.h>
@@ -196,21 +197,27 @@ void fileBrowser::populateList()
196 if(fileL !="./") { 197 if(fileL !="./") {
197 item= new QListViewItem( ListView,fileL,fileS , fileDate); 198 item= new QListViewItem( ListView,fileL,fileS , fileDate);
198 QPixmap pm; 199 QPixmap pm;
199 pm= Resource::loadPixmap( "folder" );
200 200
201 if(isDir || fileL.find("/",0,TRUE) != -1) { 201 if(isDir || fileL.find("/",0,TRUE) != -1) {
202 if( !QDir( fi->filePath() ).isReadable()) 202 if( !QDir( fi->filePath() ).isReadable())
203 pm = Resource::loadPixmap( "lockedfolder" ); 203 pm = Resource::loadPixmap( "lockedfolder" );
204 else
205 pm= Resource::loadPixmap( "folder" );
204 item->setPixmap( 0,pm ); 206 item->setPixmap( 0,pm );
205 } else { 207 } else {
206 if( !fi->isReadable() ) 208 if( !fi->isReadable() )
207 pm = Resource::loadPixmap( "locked" ); 209 pm = Resource::loadPixmap( "locked" );
208 else 210 else {
209 pm = Resource::loadPixmap( "fileopen" ); 211 MimeType mt(fi->filePath());
212 pm=mt.pixmap();
213 if(pm.isNull())
214 pm = Resource::loadPixmap( "UnknownDocument-14" );
210 item->setPixmap( 0,pm); 215 item->setPixmap( 0,pm);
211 } 216 }
217 }
212 if( fileL.find("->",0,TRUE) != -1) { 218 if( fileL.find("->",0,TRUE) != -1) {
213 // overlay link image 219 // overlay link image
220 pm= Resource::loadPixmap( "folder" );
214 QPixmap lnk = Resource::loadPixmap( "symlink" ); 221 QPixmap lnk = Resource::loadPixmap( "symlink" );
215 QPainter painter( &pm ); 222 QPainter painter( &pm );
216 painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); 223 painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk );