Diffstat (limited to 'noncore/net/mailit/viewatt.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mailit/viewatt.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/noncore/net/mailit/viewatt.cpp b/noncore/net/mailit/viewatt.cpp index 86f119f..b6f5015 100644 --- a/noncore/net/mailit/viewatt.cpp +++ b/noncore/net/mailit/viewatt.cpp | |||
@@ -20,6 +20,7 @@ | |||
20 | #include "resource.h" | 20 | #include "resource.h" |
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 | ||
24 | ViewAtt::ViewAtt(QWidget *parent, const char *name, WFlags f) | 25 | ViewAtt::ViewAtt(QWidget *parent, const char *name, WFlags f) |
25 | : QMainWindow(parent, name, f) | 26 | : QMainWindow(parent, name, f) |
@@ -43,6 +44,8 @@ void ViewAtt::update(Email *mailIn, bool inbox) | |||
43 | QListViewItem *item; | 44 | QListViewItem *item; |
44 | Enclosure *ePtr; | 45 | Enclosure *ePtr; |
45 | 46 | ||
47 | |||
48 | |||
46 | listView->clear(); | 49 | listView->clear(); |
47 | if (inbox) { | 50 | if (inbox) { |
48 | bar->clear(); | 51 | bar->clear(); |
@@ -60,10 +63,16 @@ void ViewAtt::update(Email *mailIn, bool inbox) | |||
60 | isInstalled = "Yes"; | 63 | isInstalled = "Yes"; |
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") { |
69 | actions = new QAction( tr("Play"), Resource::loadPixmap("SoundPlayer"), QString::null, CTRL + Key_C, this, 0); | 78 | actions = new QAction( tr("Play"), Resource::loadPixmap("SoundPlayer"), QString::null, CTRL + Key_C, this, 0); |
@@ -74,7 +83,7 @@ void ViewAtt::update(Email *mailIn, bool inbox) | |||
74 | actions = new QAction( tr("Show"), Resource::loadPixmap("pixmap"), QString::null, CTRL + Key_C, this, 0); | 83 | actions = new QAction( tr("Show"), Resource::loadPixmap("pixmap"), QString::null, CTRL + Key_C, this, 0); |
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 | } |
80 | 89 | ||