From ef8a09ce74ad3f0a51484d03fdf009bd5b3677bf Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 07 Aug 2004 16:10:09 +0000 Subject: Fix of the syncprofiles --- (limited to 'korganizer') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index f859b90..689618d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1173,6 +1173,10 @@ bool CalendarView::syncCalendar(QString filename, int mode) updateView(); return syncOK; } +void CalendarView::syncPhone() +{ + qDebug("CalendarView::syncPhone() "); +} void CalendarView::syncSharp() { #ifndef DESKTOP_VERSION diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index d564473..b2838db 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -425,6 +425,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser const QString &datebookFile, const QString &tasklistFile ); void syncSharp( ); + void syncPhone( ); void slotSelectPickerDate( QDate ) ; void showDatePicker( ) ; void moveIncidence(Incidence *) ; diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 424fa98..446fe2e 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -210,6 +210,9 @@ class KOPrefs : public KPimPrefs QString mRemotePassWd; QString mRemoteFile; QString mLocalTempFile; + QString mPhoneDevice; + QString mPhoneConnection; + QString mPhoneModel; int mLastSyncTime; int mSyncAlgoPrefs; diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index c3c4c26..062c95f 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -897,7 +897,13 @@ int MainWindow::ringSync() if ( syncWithFile( temp->getRemoteFileName( ), true ) ) KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); } else { - syncRemote( temp, false ); + if ( temp->getIsPhoneSync() ) { + KOPrefs::instance()->mPhoneDevice = temp->getPhoneDevice( ) ; + KOPrefs::instance()->mPhoneConnection = temp->getPhoneConnection( ); + KOPrefs::instance()->mPhoneModel = temp->getPhoneModel( ); + syncPhone(); + } else + syncRemote( temp, false ); } } @@ -2037,6 +2043,14 @@ void MainWindow::syncSharp() slotModifiedChanged( true ); } +void MainWindow::syncPhone() +{ + if ( mCalendarModifiedFlag ) + save(); + mView->syncPhone(); + slotModifiedChanged( true ); + +} void MainWindow::printSel( ) { diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index fba8c52..1d87db0 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -75,6 +75,7 @@ class MainWindow : public QMainWindow void syncSSH(); void confSync(); void syncSharp(); + void syncPhone(); void syncLocalFile(); bool syncWithFile( QString, bool ); void quickSyncLocalFile(); -- cgit v0.9.0.2