[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdepim/enterprise/kdepim/libkcal
From: Allen Winter <winter () kde ! org>
Date: 2010-09-27 22:55:44
Message-ID: 20100927225544.79E80AC88E () svn ! kde ! org
[Download RAW message or body]
SVN commit 1180418 by winterz:
in invitationAttendees(), also pass the attendee associated with the response
so we can provide a more accurate status for that person in the Attendees list.
kolab/issue4483
MERGE: trunk
M +12 -3 incidenceformatter.cpp
--- branches/kdepim/enterprise/kdepim/libkcal/incidenceformatter.cpp #1180417:1180418
@@ -2137,7 +2137,7 @@
}
}
-static QString invitationAttendees( Incidence *incidence )
+static QString invitationAttendees( Incidence *incidence, Attendee *sender )
{
QString tmpStr;
if ( !incidence ) {
@@ -2155,10 +2155,19 @@
Attendee::List attendees = incidence->attendees();
if ( !attendees.isEmpty() ) {
+ QString statusStr;
Attendee::List::ConstIterator it;
for( it = attendees.begin(); it != attendees.end(); ++it ) {
Attendee *a = *it;
if ( !iamAttendee( a ) ) {
+ if ( sender && a->email() == sender->email() ) {
+ // use the attendee taken from the response incidence,
+ // rather than the attendee from the calendar incidence.
+ a = sender;
+ statusStr = i18n( "%1 (<i>unrecorded</i>)" ).arg( a->statusStr() );
+ } else {
+ statusStr = a->statusStr();
+ }
count++;
if ( count == 1 ) {
tmpStr += "<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" columns=\"2\">";
@@ -2173,7 +2182,7 @@
tmpStr += i18n(" (delegated to %1)" ).arg( a->delegate() );
}
tmpStr += "</td>";
- tmpStr += "<td>" + a->statusStr() + "</td>";
+ tmpStr += "<td>" + statusStr + "</td>";
tmpStr += "</tr>";
}
}
@@ -2880,7 +2889,7 @@
// Add the attendee list if I am the organizer
if ( myInc && helper->calendar() ) {
- html += invitationAttendees( helper->calendar()->incidence( inc->uid() ) );
+ html += invitationAttendees( helper->calendar()->incidence( inc->uid() ), a );
}
// close the top-level table
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic