author | zautrix <zautrix> | 2004-09-11 16:02:52 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-11 16:02:52 (UTC) |
commit | 53e10fa5e66620ff1eba1c9d17738103ad511c91 (patch) (unidiff) | |
tree | c9ed39ce780dc3e8b9b7138781d77db793defdc9 | |
parent | 32f9963a39236d08718a36d5adad2a0c5c4e2602 (diff) | |
download | kdepimpi-53e10fa5e66620ff1eba1c9d17738103ad511c91.zip kdepimpi-53e10fa5e66620ff1eba1c9d17738103ad511c91.tar.gz kdepimpi-53e10fa5e66620ff1eba1c9d17738103ad511c91.tar.bz2 |
More mail enh.
-rw-r--r-- | kmicromail/libmailwrapper/abstractmail.cpp | 11 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/genericwrapper.cpp | 16 |
2 files changed, 16 insertions, 11 deletions
diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp index 374d606..44878e0 100644 --- a/kmicromail/libmailwrapper/abstractmail.cpp +++ b/kmicromail/libmailwrapper/abstractmail.cpp | |||
@@ -162,7 +162,7 @@ void AbstractMail::deleteMailList(const QValueList<RecMailP>&target) | |||
162 | 162 | ||
163 | void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targetMail ) | 163 | void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targetMail ) |
164 | { | 164 | { |
165 | qDebug("AbstractMail::downloadNewMails %s ", fromFolder->getName().latin1()); | 165 | //qDebug("AbstractMail::downloadNewMails %s ", fromFolder->getName().latin1()); |
166 | // get local folder | 166 | // get local folder |
167 | Account * acc = getAccount(); | 167 | Account * acc = getAccount(); |
168 | if ( !acc ) return; | 168 | if ( !acc ) return; |
@@ -184,7 +184,7 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe | |||
184 | } | 184 | } |
185 | QValueList<RecMailP> e; | 185 | QValueList<RecMailP> e; |
186 | targetMail->listMessages(lfName,e,acc->getMaxMailSize() ); | 186 | targetMail->listMessages(lfName,e,acc->getMaxMailSize() ); |
187 | qDebug("target has mails %d ", e.count()); | 187 | //qDebug("target has mails %d ", e.count()); |
188 | QValueList<RecMailP> n; | 188 | QValueList<RecMailP> n; |
189 | int iii = 0; | 189 | int iii = 0; |
190 | int count = t.count(); | 190 | int count = t.count(); |
@@ -201,11 +201,6 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe | |||
201 | } | 201 | } |
202 | ++jjj; | 202 | ++jjj; |
203 | } | 203 | } |
204 | if ( found ) | ||
205 | qDebug("found "); | ||
206 | else | ||
207 | qDebug("NOT found "); | ||
208 | |||
209 | if ( !found ) { | 204 | if ( !found ) { |
210 | n.append( r ); | 205 | n.append( r ); |
211 | } | 206 | } |
@@ -216,7 +211,7 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe | |||
216 | return; | 211 | return; |
217 | } | 212 | } |
218 | mvcpMailList( n,lfName,targetMail,!acc->getLeaveOnServer()); | 213 | mvcpMailList( n,lfName,targetMail,!acc->getLeaveOnServer()); |
219 | 214 | Global::statusMessage(tr("Downloaded %1 messages").arg(n.count())); | |
220 | 215 | ||
221 | #if 0 | 216 | #if 0 |
222 | QValueList<RecMailP> t; | 217 | QValueList<RecMailP> t; |
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp index 2b04847..ed591fc 100644 --- a/kmicromail/libmailwrapper/genericwrapper.cpp +++ b/kmicromail/libmailwrapper/genericwrapper.cpp | |||
@@ -46,16 +46,26 @@ QString Genericwrapper::parseDateTime( mailimf_date_time *date ) | |||
46 | init = true; | 46 | init = true; |
47 | 47 | ||
48 | } | 48 | } |
49 | QDateTime dt (QDate(date->dt_year,date->dt_month, date->dt_day ),QTime(date->dt_hour, date->dt_min, date->dt_sec ) ); | 49 | QDate da (date->dt_year,date->dt_month, date->dt_day ); |
50 | QTime ti ( date->dt_hour, date->dt_min, date->dt_sec ); | ||
51 | QDateTime dt ( da ,ti ); | ||
50 | int off = KGlobal::locale()->localTimeOffset( dt ); | 52 | int off = KGlobal::locale()->localTimeOffset( dt ); |
51 | dt = dt.addSecs( off*60 ); | 53 | //dt = dt.addSecs( off*60 ); |
52 | QString ret = KGlobal::locale()->formatDateTime( dt,true,true); | 54 | QString ret; |
55 | if ( da == QDate::currentDate () ) | ||
56 | ret = KGlobal::locale()->formatTime( ti,true); | ||
57 | |||
58 | else { | ||
59 | ret = KGlobal::locale()->formatDateTime( dt,true,true); | ||
60 | } | ||
61 | #if 0 | ||
53 | if ( off < 0 ) | 62 | if ( off < 0 ) |
54 | ret += " -"; | 63 | ret += " -"; |
55 | else | 64 | else |
56 | ret += " +"; | 65 | ret += " +"; |
57 | ret += QString::number( off / 60 ); | 66 | ret += QString::number( off / 60 ); |
58 | ret += "h"; | 67 | ret += "h"; |
68 | #endif | ||
59 | #if 0 | 69 | #if 0 |
60 | char tmp[23]; | 70 | char tmp[23]; |
61 | 71 | ||