summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/viewatt.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/mailit/viewatt.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/mailit/viewatt.cpp13
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 @@
21#include "viewatt.h" 21#include "viewatt.h"
22#include <qpe/applnk.h> 22#include <qpe/applnk.h>
23#include <qpe/mimetype.h>
23 24
24ViewAtt::ViewAtt(QWidget *parent, const char *name, WFlags f) 25ViewAtt::ViewAtt(QWidget *parent, const char *name, WFlags f)
@@ -44,4 +45,6 @@ void ViewAtt::update(Email *mailIn, bool inbox)
44 Enclosure *ePtr; 45 Enclosure *ePtr;
45 46
47
48
46 listView->clear(); 49 listView->clear();
47 if (inbox) { 50 if (inbox) {
@@ -61,8 +64,14 @@ void ViewAtt::update(Email *mailIn, bool inbox)
61 item = new QListViewItem(listView, ePtr->originalName, ePtr->contentType, isInstalled); 64 item = new QListViewItem(listView, ePtr->originalName, ePtr->contentType, isInstalled);
62 65
66 const QString& mtypeDef=(const QString&) ePtr->contentType+"/"+ePtr->contentAttribute;
67
68 MimeType mt(mtypeDef);
69
70 item->setPixmap(0, mt.pixmap());
71
72 /*
63 if (ePtr->contentType == "TEXT") { 73 if (ePtr->contentType == "TEXT") {
64 actions = new QAction( tr("View"), Resource::loadPixmap("TextEditor"), QString::null, CTRL + Key_C, this, 0); 74 actions = new QAction( tr("View"), Resource::loadPixmap("TextEditor"), QString::null, CTRL + Key_C, this, 0);
65 actions->addTo(bar); 75 actions->addTo(bar);
66 item->setPixmap(0, Resource::loadPixmap("txt"));
67 } 76 }
68 if (ePtr->contentType == "AUDIO") { 77 if (ePtr->contentType == "AUDIO") {
@@ -75,5 +84,5 @@ void ViewAtt::update(Email *mailIn, bool inbox)
75 actions->addTo(bar); 84 actions->addTo(bar);
76 item->setPixmap(0, Resource::loadPixmap("pixmap")); 85 item->setPixmap(0, Resource::loadPixmap("pixmap"));
77 } 86 }*/
78 } 87 }
79} 88}