author | llornkcor <llornkcor> | 2002-03-25 02:46:56 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-03-25 02:46:56 (UTC) |
commit | b43c59f2f8da6edfa37042e0838b38702636f4d1 (patch) (unidiff) | |
tree | 31913b2d26759d404c570c2164949da5b0796027 /core/apps/textedit | |
parent | d8820a9f2bdf9bc98c99542e3613ca9b5d2c6e0c (diff) | |
download | opie-b43c59f2f8da6edfa37042e0838b38702636f4d1.zip opie-b43c59f2f8da6edfa37042e0838b38702636f4d1.tar.gz opie-b43c59f2f8da6edfa37042e0838b38702636f4d1.tar.bz2 |
added more icon stuff
-rw-r--r-- | core/apps/textedit/fileBrowser.cpp | 53 |
1 files changed, 30 insertions, 23 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 @@ | |||
21 | #include <qpe/menubutton.h> | 21 | #include <qpe/menubutton.h> |
22 | #include <qpe/mimetype.h> | ||
22 | 23 | ||
@@ -120,3 +121,3 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags | |||
120 | FileStack->addWidget( ListView, get_unique_id() ); | 121 | FileStack->addWidget( ListView, get_unique_id() ); |
121 | mimeType="text/*"; | 122 | mimeType="text/*"; |
122 | fileSelector = new FileSelector( mimeType, FileStack, "fileselector" , FALSE, FALSE); //buggy | 123 | fileSelector = new FileSelector( mimeType, FileStack, "fileselector" , FALSE, FALSE); //buggy |
@@ -196,26 +197,32 @@ 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 | item->setPixmap( 0,pm ); | 204 | else |
205 | } else { | 205 | pm= Resource::loadPixmap( "folder" ); |
206 | if( !fi->isReadable() ) | 206 | item->setPixmap( 0,pm ); |
207 | pm = Resource::loadPixmap( "locked" ); | 207 | } else { |
208 | else | 208 | if( !fi->isReadable() ) |
209 | pm = Resource::loadPixmap( "fileopen" ); | 209 | pm = Resource::loadPixmap( "locked" ); |
210 | item->setPixmap( 0,pm); | 210 | else { |
211 | } | 211 | MimeType mt(fi->filePath()); |
212 | if( fileL.find("->",0,TRUE) != -1) { | 212 | pm=mt.pixmap(); |
213 | // overlay link image | 213 | if(pm.isNull()) |
214 | QPixmap lnk = Resource::loadPixmap( "symlink" ); | 214 | pm = Resource::loadPixmap( "UnknownDocument-14" ); |
215 | QPainter painter( &pm ); | 215 | item->setPixmap( 0,pm); |
216 | painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); | 216 | } |
217 | pm.setMask( pm.createHeuristicMask( FALSE ) ); | 217 | } |
218 | item->setPixmap( 0, pm); | 218 | if( fileL.find("->",0,TRUE) != -1) { |
219 | // overlay link image | ||
220 | pm= Resource::loadPixmap( "folder" ); | ||
221 | QPixmap lnk = Resource::loadPixmap( "symlink" ); | ||
222 | QPainter painter( &pm ); | ||
223 | painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk ); | ||
224 | pm.setMask( pm.createHeuristicMask( FALSE ) ); | ||
225 | item->setPixmap( 0, pm); | ||
226 | } | ||
219 | } | 227 | } |
220 | } | ||
221 | isDir=FALSE; | 228 | isDir=FALSE; |