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

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim/kresources/kolab/kcal
From:       Till Adam <adam () kde ! org>
Date:       2005-07-28 9:06:55
Message-ID: 1122541615.593689.23647.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 439495 by tilladam:

Forward port of:

SVN commit 439457 by tilladam:

Skip duplicate incidences in read-only folders and don't offer conflict
resolution. The user could otherwise put new mails into read-only folder
and would later be unable to sync them up again.


 M  +10 -2     resourcekolab.cpp  


--- branches/KDE/3.5/kdepim/kresources/kolab/kcal/resourcekolab.cpp #439494:439495
@@ -491,10 +491,18 @@
       mUidMap[ uid ] = StorageReference( subResource, sernum );
     } else {
       /* This is a real add, from KMail, we didn't trigger this ourselves.
-         If this uid already exists in this folder, do conflict resolution */
+       * If this uid already exists in this folder, do conflict resolution, 
+       * unless the folder is read-only, in which case the user should not be
+       * offered a means of putting mails in a folder she'll later be unable to
+       * upload. Skip the incidence, in this case. */
       if ( mUidMap.contains( uid )
           && ( mUidMap[ uid ].resource() == subResource ) ) {
-        resolveConflict( incidence, subResource, sernum );
+        if ( (*map)[ subResource ].writable() ) {
+          resolveConflict( incidence, subResource, sernum );
+        } else {
+          kdWarning( 5650 ) << "Duplicate event in a read-only folder detected! "
+            "Please inform the owner of the folder. " << endl;
+        }
         return true;
       }
       /* Add to the cache if the add didn't come from KOrganizer, in which case
[prev in list] [next in list] [prev in thread] [next in thread] 

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