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

List:       kde-commits
Subject:    kdepim/plugins/kmail/bodypartformatter
From:       Till Adam <adam () kde ! org>
Date:       2004-09-25 10:46:50
Message-ID: 20040925104650.351FA25C2 () office ! kde ! org
[Download RAW message or body]

CVS commit by tilladam: 

Handle tentative acceptance links. There's more to come in this area all 
over pim.


  M +20 -0     text_calendar.cpp   1.25


--- kdepim/plugins/kmail/bodypartformatter/text_calendar.cpp  #1.24:1.25
@@ -216,4 +216,22 @@ class UrlHandler : public KMail::Interfa
     }
 
+    bool handleAcceptConditionally( const QString& iCal, KMail::Callback& callback ) const
+    {
+      const QString receiver = callback.receiver();
+      if ( receiver.isEmpty() )
+        // Must be some error. Still return true though, since we did handle it
+        return true;
+
+      // First, save it for KOrganizer to handle
+      saveFile( receiver, iCal, "tentative" );
+
+      // Now produce the return message
+      ICalFormat format;
+      Incidence* incidence = icalToString( iCal, format );
+      if( !incidence ) return false;
+      setStatusOnMyself( incidence, Attendee::Tentative, receiver );
+      return mail( incidence, callback );
+    }
+
     bool handleDecline( const QString& iCal, KMail::Callback& callback ) const
     {
@@ -233,4 +251,6 @@ class UrlHandler : public KMail::Interfa
       if ( path == "accept" )
         return handleAccept( iCal, c );
+      if ( path == "accept_conditionally" )
+        return handleAcceptConditionally( iCal, c );
       if ( path == "decline" )
         return handleDecline( iCal, c );


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

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