-rw-r--r-- | korganizer/calendarview.cpp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 9571f16..8d024c1 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -5,5 +5,5 @@ http://www.troll.no and http://www.kde.org respectively - Copyright (c) 1997, 1998, 1999 + Copyright (c) savecale1997, 1998, 1999 Preston Brown (preton.brown@yale.edu) Fester Zigterman (F.J.F.ZigtermanRustenburg@student.utwente.nl) @@ -780,4 +780,6 @@ void CalendarView::setScrollBarStep(int val ) #ifdef DESKTOP_VERSION mDateScrollBar->setLineStep ( val ); +#else + Q_UNUSED( val ); #endif } @@ -806,4 +808,6 @@ void CalendarView::scrollBarValue(int val ) mNavigator->selectDates( d.addDays( stepdays-1) , count ); flag_blockScrollBar = false; +#else + Q_UNUSED( val ); #endif @@ -1603,4 +1607,5 @@ void CalendarView::checkExternalId( Incidence * inc ) bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) { + bool syncOK = true; int addedEvent = 0; @@ -1733,5 +1738,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int remote->deleteIncidence( inR ); inR = inL->clone(); - inR->setCalID( calID ); + inR->setCalID_block( calID ); inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) @@ -1748,5 +1753,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int local->deleteIncidence( inL ); inL = inR->clone(); - inL->setCalID( calID ); + inL->setCalID_block( calID ); if ( mSyncManager->syncWithDesktop() ) inL->setPilotId( pid ); @@ -1779,5 +1784,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); - inL->setCalID( 0 );// add to default cal + inL->setCalID_block( 0 );// add to default cal local->addIncidence( inL ); ++addedEvent; @@ -1789,5 +1794,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int inL = inR->clone(); inL->setIDStr( ":" ); - inL->setCalID( 0 );// add to default cal + inL->setCalID_block( 0 );// add to default cal local->addIncidence( inL ); ++addedEvent; @@ -1847,5 +1852,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int inR->setIDStr( ":" ); inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); - inR->setCalID( 0 );// add to default cal + inR->setCalID_block( 0 );// add to default cal remote->addIncidence( inR ); } @@ -1862,5 +1867,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int inR = inL->clone(); inR->setIDStr( ":" ); - inR->setCalID( 0 );// add to default cal + inR->setCalID_block( 0 );// add to default cal remote->addIncidence( inR ); } @@ -2450,5 +2455,7 @@ void CalendarView::mergeFileResource( QString fn ,QString resource ) if ( resource == "ALL" ) { + mCalendar->setAllCalendarEnabled( true ); mergeFile( fn ); + restoreCalendarSettings(); return; } @@ -2598,6 +2605,10 @@ bool CalendarView::saveCalendars() bool CalendarView::saveCalendarResource(QString filename, QString resource) { - if ( resource == "ALL" ) - return saveCalendar( filename ); + if ( resource == "ALL" ) { + mCalendar->setAllCalendarEnabled( true ); + bool retval = saveCalendar( filename ); + restoreCalendarSettings(); + return retval; + } int exclusiveResource = KOPrefs::instance()->getFuzzyCalendarID( resource ); if ( !exclusiveResource ) { |