author | zautrix <zautrix> | 2005-11-25 23:24:37 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-11-25 23:24:37 (UTC) |
commit | 3cd0013c04172b312ee21e80224a3b7734b4d413 (patch) (side-by-side diff) | |
tree | 9c5557ecfe874a8a4901a674c5eddcc91f585b0c | |
parent | 0e18027f386280bf427ef9d0ffec61a5516cebda (diff) | |
download | kdepimpi-3cd0013c04172b312ee21e80224a3b7734b4d413.zip kdepimpi-3cd0013c04172b312ee21e80224a3b7734b4d413.tar.gz kdepimpi-3cd0013c04172b312ee21e80224a3b7734b4d413.tar.bz2 |
sync
-rw-r--r-- | libkcal/calendar.cpp | 2 | ||||
-rw-r--r-- | libkcal/calendarlocal.cpp | 12 | ||||
-rw-r--r-- | libkcal/incidencebase.cpp | 7 | ||||
-rw-r--r-- | libkcal/incidencebase.h | 1 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 2 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 2 |
6 files changed, 17 insertions, 9 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index b1806ee..8535191 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp @@ -379,9 +379,9 @@ void Calendar::addIncidenceBranch(Incidence *i) bool Calendar::addIncidence(Incidence *i) { Incidence::AddVisitor<Calendar> v(this); if ( i->calID() == 0 ) - i->setCalID( mDefaultCalendar ); + i->setCalID_block( mDefaultCalendar ); i->setCalEnabled( true ); return i->accept(v); } void Calendar::deleteIncidence(Incidence *in) diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index c82ea92..b02f706 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -148,14 +148,14 @@ bool CalendarLocal::mergeCalendar( Calendar* remote ) if ( ! inL->isReadOnly () || inL->uid().left(15) == QString("last-syncEvent-") ) { int calID = inL->calID(); deleteIncidence( inL ); inL = inR->clone(); - inL->setCalID( calID ); + inL->setCalID_block( calID ); addIncidence( inL ); } } else { inL = inR->clone(); - inL->setCalID( 0 );// add to default cal + inL->setCalID_block( 0 );// add to default cal addIncidence( inL ); } inR = er.next(); } @@ -207,9 +207,9 @@ void CalendarLocal::addCalendar( Calendar* cal ) if ( ev->uid().left( 15 ) == QString("last-syncEvent-") ) { Event * se = event( ev->uid() ); if ( se ) el.append( se ); - ev->setCalID( 1 ); + ev->setCalID_block( 1 ); } ev->unRegisterObserver( cal ); ev->registerObserver( this ); mEventList.append( ev ); @@ -341,9 +341,9 @@ bool CalendarLocal::addEvent( Event *event ) event->registerObserver( this ); setModified( true ); if ( event->calID() == 0 ) - event->setCalID( mDefaultCalendar ); + event->setCalID_block( mDefaultCalendar ); event->setCalEnabled( true ); return true; } @@ -395,9 +395,9 @@ bool CalendarLocal::addTodo( Todo *todo ) setupRelations( todo ); setModified( true ); if ( todo->calID() == 0 ) - todo->setCalID( mDefaultCalendar ); + todo->setCalID_block( mDefaultCalendar ); todo->setCalEnabled( true ); return true; } @@ -923,9 +923,9 @@ bool CalendarLocal::addJournal(Journal *journal) journal->registerObserver( this ); setModified( true ); if ( journal->calID() == 0 ) - journal->setCalID( mDefaultCalendar ); + journal->setCalID_block( mDefaultCalendar ); journal->setCalEnabled( true ); return true; } diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index cfef973..56c0560 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp @@ -151,8 +151,15 @@ void IncidenceBase::setTagged( bool b) } void IncidenceBase::setCalID( int id ) { if ( mCalID > 0 ) { + updated(); + } + mCalID = id; +} +void IncidenceBase::setCalID_block( int id ) +{ + if ( mCalID > 0 ) { blockLastModified = true; updated(); blockLastModified = false; } diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h index 444d4c4..3edc03b 100644 --- a/libkcal/incidencebase.h +++ b/libkcal/incidencebase.h @@ -142,8 +142,9 @@ class IncidenceBase : public CustomProperties void registerObserver( Observer * ); void unRegisterObserver( Observer * ); void updated(); void setCalID( int id ); + void setCalID_block( int id ); int calID() const; void setCalEnabled( bool ); bool calEnabled() const; void setAlarmEnabled( bool ); diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index fa7804e..0109c02 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -1179,9 +1179,9 @@ void KSyncManager::syncPi() } } ++startRemote; ++startLocal; - + mAskForPreferences = false; } mPisyncFinished = true; } else { KCommandSocket* commandSocket = new KCommandSocket( "", mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() ); diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 744a914..1f9afcb 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp @@ -368,9 +368,9 @@ void KSyncPrefsDialog::setupSyncAlgTab() mRemotePort = new QLineEdit(temphb); mRemotePortAB = new QLineEdit(temphb); mRemotePortPWM = new QLineEdit(temphb); - lab = new QLabel( i18n("Local/remote Resource sync partners"), piWidget); + lab = new QLabel( i18n("Local/remote Resource sync partners (Leave empty to not sync)"), piWidget); mTableBox = new QHBox( piWidget ); mResTableKopi = new QTable( 1, 1, mTableBox ); mResTableKapi = new QTable( 1, 1, mTableBox ); mResTablePwmpi = new QTable( 1, 1, mTableBox ); |