Diffstat (limited to 'noncore/unsupported/mailit/viewatt.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/viewatt.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/noncore/unsupported/mailit/viewatt.cpp b/noncore/unsupported/mailit/viewatt.cpp index 86f119f..b6f5015 100644 --- a/noncore/unsupported/mailit/viewatt.cpp +++ b/noncore/unsupported/mailit/viewatt.cpp @@ -21,4 +21,5 @@ #include "viewatt.h" #include <qpe/applnk.h> +#include <qpe/mimetype.h> ViewAtt::ViewAtt(QWidget *parent, const char *name, WFlags f) @@ -44,4 +45,6 @@ void ViewAtt::update(Email *mailIn, bool inbox) Enclosure *ePtr; + + listView->clear(); if (inbox) { @@ -61,8 +64,14 @@ void ViewAtt::update(Email *mailIn, bool inbox) item = new QListViewItem(listView, ePtr->originalName, ePtr->contentType, isInstalled); + const QString& mtypeDef=(const QString&) ePtr->contentType+"/"+ePtr->contentAttribute; + + MimeType mt(mtypeDef); + + item->setPixmap(0, mt.pixmap()); + + /* if (ePtr->contentType == "TEXT") { actions = new QAction( tr("View"), Resource::loadPixmap("TextEditor"), QString::null, CTRL + Key_C, this, 0); actions->addTo(bar); - item->setPixmap(0, Resource::loadPixmap("txt")); } if (ePtr->contentType == "AUDIO") { @@ -75,5 +84,5 @@ void ViewAtt::update(Email *mailIn, bool inbox) actions->addTo(bar); item->setPixmap(0, Resource::loadPixmap("pixmap")); - } + }*/ } } |