author | zautrix <zautrix> | 2004-08-02 01:14:33 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-02 01:14:33 (UTC) |
commit | f6a823824e6a8be3d842e99b43dacd495bb02ba4 (patch) (side-by-side diff) | |
tree | 09f21069cd63a5e73b9fe735d82487d35e47033b | |
parent | 54157cb44316de72d776cfae70bdadf6c52f4773 (diff) | |
download | kdepimpi-f6a823824e6a8be3d842e99b43dacd495bb02ba4.zip kdepimpi-f6a823824e6a8be3d842e99b43dacd495bb02ba4.tar.gz kdepimpi-f6a823824e6a8be3d842e99b43dacd495bb02ba4.tar.bz2 |
Hack, hack, hack ...
-rw-r--r-- | korganizer/calendarview.cpp | 1 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index cbe2a10..53c079c 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -855,32 +855,33 @@ Event* CalendarView::getLastSyncEvent() lse = new Event(); lse->setUid( "last-syncEvent-"+mCurrentSyncDevice ); QString sum = ""; if ( KOPrefs::instance()->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) sum = "E: "; lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event")); lse->setDtStart( mLastCalendarSync ); lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); lse->setCategories( i18n("SyncEvent") ); lse->setReadOnly( true ); mCalendar->addEvent( lse ); } return lse; } +// probaly useless void CalendarView::setupExternSyncProfiles() { Event* lse; mExternLastSyncEvent.clear(); int i; for ( i = 0; i < KOPrefs::instance()->mExternSyncProfiles.count(); ++i ) { lse = mCalendar->event( "last-syncEvent-"+ KOPrefs::instance()->mExternSyncProfiles[i] ); if ( lse ) mExternLastSyncEvent.append( lse ); else qDebug("Last Sync event not found for %s ", KOPrefs::instance()->mExternSyncProfiles[i].latin1()); } } // we check, if the to delete event has a id for a profile // if yes, we set this id in the profile to delete diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 59c8418..67a3f52 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp @@ -555,41 +555,47 @@ void KSyncPrefsDialog::usrReadConfig() temp->readConfig( &config ); mSyncProfiles.append( temp ); } insertProfiles(); //mMyMachineName->setText(KOPrefs::instance()->mLocalMachineName ); } void KSyncPrefsDialog::usrWriteConfig() { saveProfile(); if ( currentSelection >= 0 ) profileChanged(currentSelection); //KConfig *config = KOGlobals::config(); KConfig config ( locateLocal( "config","syncprofilesrc" ) ); KSyncProfile* prof = mSyncProfiles.first(); + QStringList externalSyncProfileNames; + externalSyncProfileNames.append("Sharp_DTM");; while ( prof ) { prof->writeConfig(&config); + if ( prof->getIsPhoneSync( ) ) + externalSyncProfileNames.append(prof->getName( ) ); prof = mSyncProfiles.next(); } //KOPrefs::instance()->mSyncProfileNames = mSyncProfileNames; //KOPrefs::instance()->mLocalMachineName = mMyMachineName->text(); config.setGroup("General"); config.writeEntry("SyncProfileNames",mSyncProfileNames); + config.writeEntry("ExternSyncProfiles",externalSyncProfileNames); config.writeEntry("LocalMachineName",mMyMachineName->text()); + config.sync(); } void KSyncPrefsDialog::helpDevice() { QString hint = i18n("Insert device where\nphone is connected. E.g.:\n"); #ifdef _WIN32_ hint += "Leave empty for Irda.\n" "com1:\n(first serial port)\n" "usb not supported\n" "???\n(bluetooth device address)\n"; #else hint += "/dev/ircomm\n(Irda)\n" "/dev/ttyS0\n(first serial port)\n" "/dev/ttyUSB0\n(first device usb port)\n" "???\n(bluetooth device address)\n"; |