summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-11-25 23:24:37 (UTC)
committer zautrix <zautrix>2005-11-25 23:24:37 (UTC)
commit3cd0013c04172b312ee21e80224a3b7734b4d413 (patch) (side-by-side diff)
tree9c5557ecfe874a8a4901a674c5eddcc91f585b0c
parent0e18027f386280bf427ef9d0ffec61a5516cebda (diff)
downloadkdepimpi-3cd0013c04172b312ee21e80224a3b7734b4d413.zip
kdepimpi-3cd0013c04172b312ee21e80224a3b7734b4d413.tar.gz
kdepimpi-3cd0013c04172b312ee21e80224a3b7734b4d413.tar.bz2
sync
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendar.cpp2
-rw-r--r--libkcal/calendarlocal.cpp12
-rw-r--r--libkcal/incidencebase.cpp7
-rw-r--r--libkcal/incidencebase.h1
-rw-r--r--libkdepim/ksyncmanager.cpp2
-rw-r--r--libkdepim/ksyncprefsdialog.cpp2
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
@@ -377,13 +377,13 @@ 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)
{
if ( in->typeID() == eventID )
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index c82ea92..b02f706 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -146,18 +146,18 @@ bool CalendarLocal::mergeCalendar( Calendar* remote )
inL = incidenceForUid( inR->uid(),false );
if ( inL ) {
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();
}
return true;
}
@@ -205,13 +205,13 @@ void CalendarLocal::addCalendar( Calendar* cal )
Event * ev = EventList.first();
while ( ev ) {
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 );
ev = EventList.next();
}
@@ -339,13 +339,13 @@ bool CalendarLocal::addEvent( Event *event )
insertEvent( event );
event->registerObserver( this );
setModified( true );
if ( event->calID() == 0 )
- event->setCalID( mDefaultCalendar );
+ event->setCalID_block( mDefaultCalendar );
event->setCalEnabled( true );
return true;
}
void CalendarLocal::deleteEvent( Event *event )
@@ -393,13 +393,13 @@ bool CalendarLocal::addTodo( Todo *todo )
// Set up subtask relations
setupRelations( todo );
setModified( true );
if ( todo->calID() == 0 )
- todo->setCalID( mDefaultCalendar );
+ todo->setCalID_block( mDefaultCalendar );
todo->setCalEnabled( true );
return true;
}
void CalendarLocal::deleteTodo( Todo *todo )
{
@@ -921,13 +921,13 @@ bool CalendarLocal::addJournal(Journal *journal)
mJournalList.append(journal);
journal->registerObserver( this );
setModified( true );
if ( journal->calID() == 0 )
- journal->setCalID( mDefaultCalendar );
+ journal->setCalID_block( mDefaultCalendar );
journal->setCalEnabled( true );
return true;
}
void CalendarLocal::deleteJournal( Journal *journal )
{
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index cfef973..56c0560 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -149,12 +149,19 @@ void IncidenceBase::setTagged( bool b)
{
mIsTagged = 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;
}
mCalID = id;
}
diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h
index 444d4c4..3edc03b 100644
--- a/libkcal/incidencebase.h
+++ b/libkcal/incidencebase.h
@@ -140,12 +140,13 @@ class IncidenceBase : public CustomProperties
void removeID(const QString &);
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 );
bool alarmEnabled() const;
bool isTagged() const;
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index fa7804e..0109c02 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -1177,13 +1177,13 @@ void KSyncManager::syncPi()
qApp->processEvents();
}
}
}
++startRemote;
++startLocal;
-
+ mAskForPreferences = false;
}
mPisyncFinished = true;
} else {
KCommandSocket* commandSocket = new KCommandSocket( "", mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() );
connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) );
commandSocket->readFile( syncFileName() );
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 744a914..1f9afcb 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -366,13 +366,13 @@ void KSyncPrefsDialog::setupSyncAlgTab()
lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget);
temphb = new QHBox( piWidget );
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 );
mResTableKopi->horizontalHeader()->setLabel( 0, i18n("Remote") );
mResTableKapi->horizontalHeader()->setLabel( 0, i18n("Remote") );