author | alwin <alwin> | 2004-10-26 01:08:58 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-10-26 01:08:58 (UTC) |
commit | cd3245ade209b4672ab5c51003aa66b5908c67a1 (patch) (unidiff) | |
tree | dfd4246557ff5d8804204387660de7e0afbd4032 /noncore/net/mail/libmailwrapper/mailtypes.cpp | |
parent | 9e97864f04686ca8fc672de950cbbef4ff6a5ec6 (diff) | |
download | opie-cd3245ade209b4672ab5c51003aa66b5908c67a1.zip opie-cd3245ade209b4672ab5c51003aa66b5908c67a1.tar.gz opie-cd3245ade209b4672ab5c51003aa66b5908c67a1.tar.bz2 |
Resolved a feature request:
unique display of date-time of a mail
maillist now sorted for mail-date as default, user can switch sort order
to all other items (subject, author, size)
Diffstat (limited to 'noncore/net/mail/libmailwrapper/mailtypes.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.cpp | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp index d4395a2..b009b75 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.cpp +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp | |||
@@ -1,22 +1,23 @@ | |||
1 | #include "mailtypes.h" | 1 | #include "mailtypes.h" |
2 | 2 | ||
3 | #include <opie2/odebug.h> | 3 | #include <opie2/odebug.h> |
4 | #include <qpe/timestring.h> | ||
4 | 5 | ||
5 | #include <stdlib.h> | 6 | #include <stdlib.h> |
6 | 7 | ||
7 | using namespace Opie::Core; | 8 | using namespace Opie::Core; |
8 | RecMail::RecMail() | 9 | RecMail::RecMail() |
9 | :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7) | 10 | :Opie::Core::ORefCount(),subject(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7),maildate(),date("") |
10 | { | 11 | { |
11 | init(); | 12 | init(); |
12 | } | 13 | } |
13 | 14 | ||
14 | RecMail::RecMail(const RecMail&old) | 15 | RecMail::RecMail(const RecMail&old) |
15 | :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) | 16 | :Opie::Core::ORefCount(),subject(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7),maildate(),date("") |
16 | { | 17 | { |
17 | init(); | 18 | init(); |
18 | copy_old(old); | 19 | copy_old(old); |
19 | odebug << "Copy constructor RecMail" << oendl; | 20 | odebug << "Copy constructor RecMail" << oendl; |
20 | } | 21 | } |
21 | 22 | ||
22 | RecMail::~RecMail() | 23 | RecMail::~RecMail() |
@@ -27,6 +28,7 @@ RecMail::~RecMail() | |||
27 | void RecMail::copy_old(const RecMail&old) | 28 | void RecMail::copy_old(const RecMail&old) |
28 | { | 29 | { |
29 | subject = old.subject; | 30 | subject = old.subject; |
31 | maildate = old.maildate; | ||
30 | date = old.date; | 32 | date = old.date; |
31 | mbox = old.mbox; | 33 | mbox = old.mbox; |
32 | msg_id = old.msg_id; | 34 | msg_id = old.msg_id; |
@@ -53,6 +55,17 @@ void RecMail::init() | |||
53 | wrapper = 0; | 55 | wrapper = 0; |
54 | } | 56 | } |
55 | 57 | ||
58 | void RecMail::setDate( const QDateTime&a,int offset) | ||
59 | { | ||
60 | QString timestring = TimeString::numberDateString(a.date())+" "; | ||
61 | timestring+=TimeString::timeString(a.time()); | ||
62 | if (offset > 0) { | ||
63 | timestring.sprintf(timestring+" %+05i",offset); | ||
64 | } | ||
65 | date = timestring; | ||
66 | maildate = a; | ||
67 | } | ||
68 | |||
56 | void RecMail::setWrapper(AbstractMail*awrapper) | 69 | void RecMail::setWrapper(AbstractMail*awrapper) |
57 | { | 70 | { |
58 | wrapper = awrapper; | 71 | wrapper = awrapper; |
@@ -134,7 +147,7 @@ RecPart::RecPart(const RecPart&old) | |||
134 | m_size = old.m_size; | 147 | m_size = old.m_size; |
135 | m_Parameters = old.m_Parameters; | 148 | m_Parameters = old.m_Parameters; |
136 | m_poslist = old.m_poslist; | 149 | m_poslist = old.m_poslist; |
137 | odebug << "RecPart copy constructor" << oendl; | 150 | odebug << "RecPart copy constructor" << oendl; |
138 | } | 151 | } |
139 | 152 | ||
140 | RecPart::~RecPart() | 153 | RecPart::~RecPart() |
@@ -258,7 +271,7 @@ RecBody::RecBody(const RecBody&old) | |||
258 | m_BodyText = old.m_BodyText; | 271 | m_BodyText = old.m_BodyText; |
259 | m_PartsList = old.m_PartsList; | 272 | m_PartsList = old.m_PartsList; |
260 | m_description = old.m_description; | 273 | m_description = old.m_description; |
261 | odebug << "Recbody copy constructor" << oendl; | 274 | odebug << "Recbody copy constructor" << oendl; |
262 | } | 275 | } |
263 | 276 | ||
264 | RecBody::~RecBody() | 277 | RecBody::~RecBody() |
@@ -323,14 +336,14 @@ encodedString::encodedString(const encodedString&old) | |||
323 | { | 336 | { |
324 | init(); | 337 | init(); |
325 | copy_old(old); | 338 | copy_old(old); |
326 | odebug << "encodedeString: copy constructor!" << oendl; | 339 | odebug << "encodedeString: copy constructor!" << oendl; |
327 | } | 340 | } |
328 | 341 | ||
329 | encodedString& encodedString::operator=(const encodedString&old) | 342 | encodedString& encodedString::operator=(const encodedString&old) |
330 | { | 343 | { |
331 | init(); | 344 | init(); |
332 | copy_old(old); | 345 | copy_old(old); |
333 | odebug << "encodedString: assign operator!" << oendl; | 346 | odebug << "encodedString: assign operator!" << oendl; |
334 | return *this; | 347 | return *this; |
335 | } | 348 | } |
336 | 349 | ||
@@ -396,4 +409,3 @@ folderStat&folderStat::operator=(const folderStat&old) | |||
396 | message_recent = old.message_recent; | 409 | message_recent = old.message_recent; |
397 | return *this; | 410 | return *this; |
398 | } | 411 | } |
399 | |||