summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2004-09-12 19:26:13 (UTC)
committer zautrix <zautrix>2004-09-12 19:26:13 (UTC)
commit5b434dd78f71bcea5e6067fc8ae0faaaea313f9d (patch) (side-by-side diff)
treeed532e602a3b503b72a46ea18d40e3a5dc97aa3f /korganizer
parentbc4153a99e205f43d0144e2e910730dd1a14d402 (diff)
downloadkdepimpi-5b434dd78f71bcea5e6067fc8ae0faaaea313f9d.zip
kdepimpi-5b434dd78f71bcea5e6067fc8ae0faaaea313f9d.tar.gz
kdepimpi-5b434dd78f71bcea5e6067fc8ae0faaaea313f9d.tar.bz2
phone fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index cfd9290..d5d31e2 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1124,6 +1124,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
}
inL = el.next();
}
+ int delFut = 0;
if ( KOPrefs::instance()->mWriteBackInFuture ) {
er = remote->rawIncidences();
inR = er.first();
@@ -1138,9 +1139,18 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
else
dt = cur.addSecs( 62 );
}
- else dt = inR->dtStart();
- if ( dt < cur || dt > end )
+ else if (inR->type() == "Event" ) {
+ bool ok;
+ dt = inR->getNextOccurence( cur, &ok );
+ if ( !ok )
+ dt = cur.addSecs( -62 );
+ }
+ else
+ dt = inR->dtStart();
+ if ( dt < cur || dt > end ) {
remote->deleteIncidence( inR );
+ ++delFut;
+ }
inR = er.next();
}
}
@@ -1158,6 +1168,11 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
remote->addEvent( eventRSync );
QString mes;
mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR );
+ QString delmess;
+ if ( delFut ) {
+ delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are in the past or\nmore than %d weeks in the future.\n"),delFut, KOPrefs::instance()->mWriteBackInFuture );
+ mes += delmess;
+ }
if ( KOPrefs::instance()->mShowSyncSummary ) {
KMessageBox::information(this, mes, i18n("KO/Pi Synchronization") );
}
@@ -1245,12 +1260,10 @@ void CalendarView::syncExternal( int mode )
{
QPtrList<Incidence> iL = mCalendar->rawIncidences();
Incidence* inc = iL.first();
- /* obsolete
while ( inc ) {
- inc->setZaurusStat( inc->revision () );
+ inc->removeID(mCurrentSyncDevice);
inc = iL.next();
}
- */
#ifndef DESKTOP_VERSION
if ( sharpFormat )
sharpFormat->save(calendar);