summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 6e61351..4667918 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1191,17 +1191,21 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
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.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInFuture, remRem-delFut);
mes += delmess;
}
+ mCalendar->checkAlarmForIncidence( 0, true );
+ qDebug( mes );
if ( mSyncManager->mShowSyncSummary ) {
- KMessageBox::information(this, mes, i18n("KO/Pi Synchronization") );
+ if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes,
+ i18n("KO/Pi Synchronization"),i18n("Write back"))) {
+ qDebug("cancelled ");
+ return false;
+ }
}
- qDebug( mes );
- mCalendar->checkAlarmForIncidence( 0, true );
return syncOK;
}
void CalendarView::setSyncDevice( QString s )
{
mCurrentSyncDevice= s;
@@ -1309,12 +1313,14 @@ void CalendarView::syncExternal( int mode )
if ( lse ) {
lse->setReadOnly( false );
lse->setDescription( "" );
lse->setReadOnly( true );
}
}
+ } else {
+ topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") );
}
setModified( true );
} else {
QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ;
QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"),
question, i18n("Ok")) ;