[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    proko2: kdepim
From:       Bo Thorsen <bo () sonofthor ! dk>
Date:       2004-10-28 7:48:31
Message-ID: 20041028074831.6E3E416C3E () office ! kde ! org
[Download RAW message or body]

CVS commit by thorsen: 

Don't reset rsvp on mail scheduling


  M +8 -17     korganizer/kogroupware.cpp   1.43.2.10
  M +0 -1      libkcal/scheduler.cpp   1.38.2.2


--- kdepim/korganizer/kogroupware.cpp  #1.43.2.9:1.43.2.10
@@ -178,24 +178,15 @@ void KOGroupware::incomingDirChanged( co
     dynamic_cast<KCal::Incidence*>( message->event() );
   KCal::MailScheduler scheduler( mCalendar );
-  if ( action.startsWith( "accepted" ) ) {
-    // Find myself and set to answered and accepted
+  if ( action.startsWith( "accepted" ) || action.startsWith( "tentative" ) ) {
+    // Find myself and set my status. This can't be done in the scheduler,
+    // since this does not know the choice I made in the KMail bpf
     KCal::Attendee::List attendees = incidence->attendees();
     KCal::Attendee::List::ConstIterator it;
     for ( it = attendees.begin(); it != attendees.end(); ++it ) {
       if( (*it)->email() == receiver ) {
+        if ( action.startsWith( "accepted" ) )
         (*it)->setStatus( KCal::Attendee::Accepted );
-        (*it)->setRSVP(false);
-        break;
-      }
-    }
-    scheduler.acceptTransaction( incidence, method, status );
-  } else if ( action.startsWith( "tentative" ) ) {
-    // Find myself and set to answered and tentative
-    KCal::Attendee::List attendees = incidence->attendees();
-    KCal::Attendee::List::ConstIterator it;
-    for ( it = attendees.begin(); it != attendees.end(); ++it ) {
-      if( (*it)->email() == receiver ) {
+        else
         (*it)->setStatus( KCal::Attendee::Tentative );
-        (*it)->setRSVP(false);
         break;
       }
@@ -203,5 +194,5 @@ void KOGroupware::incomingDirChanged( co
     scheduler.acceptTransaction( incidence, method, status );
   } else if ( action.startsWith( "cancel" ) )
-    // TODO: Could this be done like the others?
+    // Delete the old incidence, if one is present
     mCalendar->deleteIncidence( incidence );
   else if ( action.startsWith( "reply" ) )

--- kdepim/libkcal/scheduler.cpp  #1.38.2.1:1.38.2.2
@@ -312,5 +312,4 @@ bool Scheduler::acceptReply(IncidenceBas
           kdDebug(5800) << "Scheduler::acceptTransaction update attendee" << endl;
           attEv->setStatus(attIn->status());
-          attEv->setRSVP(false);
           ret = true;
         }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic