author | zautrix <zautrix> | 2004-09-22 01:13:09 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-22 01:13:09 (UTC) |
commit | ed2feaa9f7e2064e5b26ff678a25eb79ceae599b (patch) (side-by-side diff) | |
tree | bd698d689aa16ce8c52c5060402d9560f95a713e | |
parent | 01572248367c63119514d15d7401a5b2b83349a0 (diff) | |
download | kdepimpi-ed2feaa9f7e2064e5b26ff678a25eb79ceae599b.zip kdepimpi-ed2feaa9f7e2064e5b26ff678a25eb79ceae599b.tar.gz kdepimpi-ed2feaa9f7e2064e5b26ff678a25eb79ceae599b.tar.bz2 |
Sync dialog fixes
-rw-r--r-- | korganizer/calendarview.cpp | 4 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 6 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.h | 1 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.cpp | 23 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.h | 15 |
5 files changed, 19 insertions, 30 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 7fae4a9..bc8625d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1153,4 +1153,4 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int QDateTime dt; - QDateTime cur = QDateTime::currentDateTime(); - QDateTime end = cur.addSecs( KOPrefs::instance()->mWriteBackInFuture * 3600 *24 *7 ); + QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); + QDateTime end = cur.addDays( (KOPrefs::instance()->mWriteBackInFuture +1 ) *7 ); while ( inR ) { diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 857ceac..a1eebec 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp @@ -196,3 +196,4 @@ void KSyncPrefsDialog::setupSyncAlgTab() topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); - ++iii; + ++iii; + mWriteContactToSIM= new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); QHBox* temphb = new QHBox( phoneWidget ); @@ -342,2 +343,3 @@ void KSyncPrefsDialog::profileChanged( int item ) + mWriteContactToSIM->setChecked( prof->getWriteContactToSIM()); mPhoneDevice->setText(prof->getPhoneDevice()); @@ -473,2 +475,4 @@ void KSyncPrefsDialog::saveProfile() prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); + + prof->setWriteContactToSIM(mWriteContactToSIM->isChecked()); prof->setPhoneDevice( mPhoneDevice->text() ); diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h index 3060e78..d4e1559 100644 --- a/libkdepim/ksyncprefsdialog.h +++ b/libkdepim/ksyncprefsdialog.h @@ -125,2 +125,3 @@ class KSyncPrefsDialog : public KDialog QCheckBox* mShowSummaryAfterSync; + QCheckBox* mWriteContactToSIM; }; diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp index e7c35fb..c599208 100644 --- a/libkdepim/ksyncprofile.cpp +++ b/libkdepim/ksyncprofile.cpp @@ -1,3 +1,3 @@ /* - This file is part of KOrganizer. + This file is part of KDE-Pim/Pi. Copyright (c) 2004 Lutz Rogowski <rogowski@kde.org> @@ -64,2 +64,3 @@ KSyncProfile* KSyncProfile::clone() myClone->setIsPhoneSync( mIsPhoneSync ); + myClone->setWriteContactToSIM( mWriteContactToSIM ); myClone->setName( "noName" ); @@ -92,2 +93,3 @@ void KSyncProfile::setDefault() mIsPhoneSync = false; + mWriteContactToSIM = false; mPhoneDevice = "/dev/ircomm"; @@ -124,2 +126,4 @@ void KSyncProfile::readConfig(KConfig *config ) mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture ); + mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile ); + mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM ); mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs ); @@ -165,2 +169,4 @@ void KSyncProfile::writeConfig( KConfig * config ) config->writeEntry( "WriteBackFuture",mWriteBackFuture ); + config->writeEntry( "WriteBackFile",mWriteBackFile ); + config->writeEntry( "WriteContactToSIM",mWriteContactToSIM ); config->writeEntry( "SyncPrefs", mSyncPrefs ); @@ -171,16 +177 @@ void KSyncProfile::writeConfig( KConfig * config ) -/* -class KPrefsItemInt : public KPrefsItem { - public: - KPrefsItemInt(const QString &group,const QString &name,int *,int defaultValue=0); - virtual ~KPrefsItemInt() {} - - void setDefault(); - void readConfig(KConfig *); - void writeConfig(KConfig *); - - private: - int *mReference; - int mDefault; -}; -*/ diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h index a0cfb71..0039a4b 100644 --- a/libkdepim/ksyncprofile.h +++ b/libkdepim/ksyncprofile.h @@ -1,3 +1,3 @@ /* - This file is part of KOrganizer. + This file is part of KDE-Pim/Pi. Copyright (c) 2004 Lutz Rogowski <rogowski@kde.org> @@ -35,13 +35,3 @@ class KConfig; -/** - @short Class for storing a preferences setting - @author Cornelius Schumacher - @see KPref - This class represents one preferences setting as used by @ref KPrefs. - Subclasses of KPrefsItem implement storage functions for a certain type of - setting. Normally you don't have to use this class directly. Use the special - addItem() functions of KPrefs instead. If you subclass this class you will - have to register instances with the function KPrefs::addItem(). -*/ class KSyncProfile : public QObject { @@ -98,2 +88,4 @@ class KSyncProfile : public QObject { bool getWriteBackFile( ) { return mWriteBackFile;} + void setWriteContactToSIM( bool b ) { mWriteContactToSIM= b;} + bool getWriteContactToSIM( ) { return mWriteContactToSIM;} void setIncludeInRingSync( bool b ) {mIncludeInRingSync = b;} @@ -136,2 +128,3 @@ class KSyncProfile : public QObject { bool mIsPhoneSync; + bool mWriteContactToSIM; }; |