author | alwin <alwin> | 2004-01-03 13:04:52 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-01-03 13:04:52 (UTC) |
commit | 22564b62e15c1ea3feada5b2f9b6ec4d98b40c6b (patch) (unidiff) | |
tree | 85847776be6743270b18f5e1df9fa6451288f7a6 | |
parent | 452aac36b77ed1f7e6db3a7952028bf6027e54b6 (diff) | |
download | opie-22564b62e15c1ea3feada5b2f9b6ec4d98b40c6b.zip opie-22564b62e15c1ea3feada5b2f9b6ec4d98b40c6b.tar.gz opie-22564b62e15c1ea3feada5b2f9b6ec4d98b40c6b.tar.bz2 |
some more display beauty
-rw-r--r-- | noncore/net/mail/viewmail.cpp | 14 | ||||
-rw-r--r-- | noncore/net/mail/viewmail.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp index d4c5150..ed77eb5 100644 --- a/noncore/net/mail/viewmail.cpp +++ b/noncore/net/mail/viewmail.cpp | |||
@@ -64,2 +64,14 @@ AttachItem* ViewMail::searchParent(const QValueList<int>&path) | |||
64 | 64 | ||
65 | AttachItem* ViewMail::lastChild(AttachItem*parent) | ||
66 | { | ||
67 | if (!parent) return 0; | ||
68 | AttachItem* item = (AttachItem*)parent->firstChild(); | ||
69 | if (!item) return item; | ||
70 | AttachItem*temp=0; | ||
71 | while( (temp=(AttachItem*)item->nextSibling())) { | ||
72 | item = temp; | ||
73 | } | ||
74 | return item; | ||
75 | } | ||
76 | |||
65 | void ViewMail::setBody( RecBody body ) { | 77 | void ViewMail::setBody( RecBody body ) { |
@@ -148,2 +160,4 @@ for (unsigned int i = 0; i < body.Parts().count();++i) { | |||
148 | if (parentItem) { | 160 | if (parentItem) { |
161 | AttachItem*temp = lastChild(parentItem); | ||
162 | if (temp) curItem = temp; | ||
149 | curItem=new AttachItem(parentItem,curItem,type,desc,filename,fsize,i,body.Parts()[i].Positionlist()); | 163 | curItem=new AttachItem(parentItem,curItem,type,desc,filename,fsize,i,body.Parts()[i].Positionlist()); |
diff --git a/noncore/net/mail/viewmail.h b/noncore/net/mail/viewmail.h index b3d3b4e..29681cc 100644 --- a/noncore/net/mail/viewmail.h +++ b/noncore/net/mail/viewmail.h | |||
@@ -44,2 +44,3 @@ protected: | |||
44 | AttachItem* searchParent(const QValueList<int>&path); | 44 | AttachItem* searchParent(const QValueList<int>&path); |
45 | AttachItem* lastChild(AttachItem*parent); | ||
45 | 46 | ||