summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Unidiff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 940ea91..ccacc52 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1452,6 +1452,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1452 else 1452 else
1453 idS = inR->IDStr(); 1453 idS = inR->IDStr();
1454 int calID = inR->calID();
1454 remote->deleteIncidence( inR ); 1455 remote->deleteIncidence( inR );
1455 inR = inL->clone(); 1456 inR = inL->clone();
1457 inR->setCalID( calID );
1456 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 1458 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
1457 if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) 1459 if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL )
@@ -1464,6 +1466,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1464 idS = inL->IDStr(); 1466 idS = inL->IDStr();
1465 int pid = inL->pilotId(); 1467 int pid = inL->pilotId();
1468 int calID = inL->calID();
1466 local->deleteIncidence( inL ); 1469 local->deleteIncidence( inL );
1467 inL = inR->clone(); 1470 inL = inR->clone();
1471 inL->setCalID( calID );
1468 if ( mSyncManager->syncWithDesktop() ) 1472 if ( mSyncManager->syncWithDesktop() )
1469 inL->setPilotId( pid ); 1473 inL->setPilotId( pid );
@@ -1494,4 +1498,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1494 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1498 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1495 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); 1499 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
1500
1501 inL->setCalID( 0 );// add to default cal
1496 local->addIncidence( inL ); 1502 local->addIncidence( inL );
1497 ++addedEvent; 1503 ++addedEvent;
@@ -1503,4 +1509,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1503 inL = inR->clone(); 1509 inL = inR->clone();
1504 inL->setIDStr( ":" ); 1510 inL->setIDStr( ":" );
1511 inL->setCalID( 0 );// add to default cal
1505 local->addIncidence( inL ); 1512 local->addIncidence( inL );
1506 ++addedEvent; 1513 ++addedEvent;
@@ -1560,4 +1567,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1560 inR->setIDStr( ":" ); 1567 inR->setIDStr( ":" );
1561 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 1568 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
1569 inR->setCalID( 0 );// add to default cal
1562 remote->addIncidence( inR ); 1570 remote->addIncidence( inR );
1563 } 1571 }
@@ -1574,4 +1582,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1574 inR = inL->clone(); 1582 inR = inL->clone();
1575 inR->setIDStr( ":" ); 1583 inR->setIDStr( ":" );
1584 inR->setCalID( 0 );// add to default cal
1576 remote->addIncidence( inR ); 1585 remote->addIncidence( inR );
1577 } 1586 }
@@ -2144,4 +2153,13 @@ bool CalendarView::openCalendar(QString filename, bool merge)
2144 return false; 2153 return false;
2145} 2154}
2155void CalendarView::mergeFile( QString fn )
2156{
2157 clearAllViews();
2158 mCalendar->mergeCalendarFile( fn );
2159 mCalendar->reInitAlarmSettings();
2160 setSyncEventsReadOnly();
2161 updateUnmanagedViews();
2162 updateView();
2163}
2146void CalendarView::showOpenError() 2164void CalendarView::showOpenError()
2147{ 2165{
@@ -3359,4 +3377,5 @@ void CalendarView::newEvent()
3359 3377
3360 QDate date = mNavigator->selectedDates().first(); 3378 QDate date = mNavigator->selectedDates().first();
3379#if 0
3361 QDateTime current = QDateTime::currentDateTime(); 3380 QDateTime current = QDateTime::currentDateTime();
3362 if ( date <= current.date() ) { 3381 if ( date <= current.date() ) {
@@ -3365,4 +3384,5 @@ void CalendarView::newEvent()
3365 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); 3384 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) );
3366 } else 3385 } else
3386#endif
3367 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), 3387 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ),
3368 QDateTime( date, QTime( KOPrefs::instance()->mStartTime + 3388 QDateTime( date, QTime( KOPrefs::instance()->mStartTime +