author | groucho <groucho> | 2003-04-13 10:29:05 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-04-13 10:29:05 (UTC) |
commit | 8cc217bed9c122a7c7448e2cd59bfde330dfcfad (patch) (unidiff) | |
tree | f802c03bbddf54ecc541ce23bdc43da0fc8b390b /noncore/net/mailit/viewatt.cpp | |
parent | 64d6b3e723b9b2fc3b1f3eea6da6344c5f26ce1e (diff) | |
download | opie-8cc217bed9c122a7c7448e2cd59bfde330dfcfad.zip opie-8cc217bed9c122a7c7448e2cd59bfde330dfcfad.tar.gz opie-8cc217bed9c122a7c7448e2cd59bfde330dfcfad.tar.bz2 |
- Uses mime types for attachment reading
- Addresses are read from ocontactacess
Diffstat (limited to 'noncore/net/mailit/viewatt.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mailit/viewatt.cpp | 15 |
1 files changed, 12 insertions, 3 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,11 +63,17 @@ 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")); | 76 | } |
67 | } | ||
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); |
70 | actions->addTo(bar); | 79 | actions->addTo(bar); |
@@ -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 | ||