author | zautrix <zautrix> | 2004-08-07 17:37:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-07 17:37:12 (UTC) |
commit | 2219ddf2cb8022a24101e45ca439e65e95743388 (patch) (unidiff) | |
tree | 3e15d6b069a82901a5e032f641889b1870fc6ede /korganizer | |
parent | 88b0d33b8b0b1f6ae320cfc863ca6a47fa8fec22 (diff) | |
download | kdepimpi-2219ddf2cb8022a24101e45ca439e65e95743388.zip kdepimpi-2219ddf2cb8022a24101e45ca439e65e95743388.tar.gz kdepimpi-2219ddf2cb8022a24101e45ca439e65e95743388.tar.bz2 |
added gammu
-rw-r--r-- | korganizer/calendarview.cpp | 42 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 8 |
3 files changed, 41 insertions, 10 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 689618d..a7f7010 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -85,2 +85,3 @@ | |||
85 | #endif | 85 | #endif |
86 | #include <libkcal/phoneformat.h> | ||
86 | #ifndef KORG_NOMAIL | 87 | #ifndef KORG_NOMAIL |
@@ -1177,8 +1178,7 @@ void CalendarView::syncPhone() | |||
1177 | { | 1178 | { |
1178 | qDebug("CalendarView::syncPhone() "); | 1179 | syncExternal( 1 ); |
1179 | } | 1180 | } |
1180 | void CalendarView::syncSharp() | 1181 | void CalendarView::syncExternal( int mode ) |
1181 | { | 1182 | { |
1182 | #ifndef DESKTOP_VERSION | 1183 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
1183 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | ||
1184 | //mCurrentSyncDevice = "sharp-DTM"; | 1184 | //mCurrentSyncDevice = "sharp-DTM"; |
@@ -1190,4 +1190,19 @@ void CalendarView::syncSharp() | |||
1190 | bool syncOK = false; | 1190 | bool syncOK = false; |
1191 | SharpFormat sharpFormat; | 1191 | boo loadSuccess = false; |
1192 | if ( sharpFormat.load( calendar, mCalendar ) ) { | 1192 | PhoneFormat* phoneFormat = 0; |
1193 | #ifndef DESKTOP_VERSION | ||
1194 | SharpFormat* sharpFormat = 0; | ||
1195 | if ( mode == 0 ) { // sharp | ||
1196 | sharpFormat = new SharpFormat () ; | ||
1197 | loadSuccess = sharpFormat->load( calendar, mCalendar ); | ||
1198 | |||
1199 | } else | ||
1200 | #endif | ||
1201 | if ( mode == 1 ) { // phone | ||
1202 | phoneFormat = new PhoneFormat (); | ||
1203 | loadSuccess = phoneFormat->load( calendar, mCalendar ); | ||
1204 | |||
1205 | } else | ||
1206 | return; | ||
1207 | if ( loadSuccess ) { | ||
1193 | getEventViewerDialog()->setSyncMode( true ); | 1208 | getEventViewerDialog()->setSyncMode( true ); |
@@ -1207,4 +1222,8 @@ void CalendarView::syncSharp() | |||
1207 | */ | 1222 | */ |
1208 | // pending: clean last sync event description | 1223 | #ifndef DESKTOP_VERSION |
1209 | sharpFormat.save(calendar); | 1224 | if ( sharpFormat ) |
1225 | sharpFormat->save(calendar); | ||
1226 | #endif | ||
1227 | if ( phoneFormat ) | ||
1228 | phoneFormat->save(calendar); | ||
1210 | iL = calendar->rawIncidences(); | 1229 | iL = calendar->rawIncidences(); |
@@ -1240,3 +1259,8 @@ void CalendarView::syncSharp() | |||
1240 | return ;//syncOK; | 1259 | return ;//syncOK; |
1241 | #endif | 1260 | |
1261 | } | ||
1262 | void CalendarView::syncSharp() | ||
1263 | { | ||
1264 | syncExternal( 0 ); | ||
1265 | |||
1242 | } | 1266 | } |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index b2838db..a3315ad 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -428,2 +428,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
428 | void syncPhone( ); | 428 | void syncPhone( ); |
429 | void syncExternal( int mode ); | ||
429 | void slotSelectPickerDate( QDate ) ; | 430 | void slotSelectPickerDate( QDate ) ; |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 062c95f..cce182a 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1002,3 +1002,9 @@ void MainWindow::slotSyncMenu( int action ) | |||
1002 | } else { | 1002 | } else { |
1003 | syncRemote( temp ); | 1003 | if ( temp->getIsPhoneSync() ) { |
1004 | KOPrefs::instance()->mPhoneDevice = temp->getPhoneDevice( ) ; | ||
1005 | KOPrefs::instance()->mPhoneConnection = temp->getPhoneConnection( ); | ||
1006 | KOPrefs::instance()->mPhoneModel = temp->getPhoneModel( ); | ||
1007 | syncPhone(); | ||
1008 | } else | ||
1009 | syncRemote( temp ); | ||
1004 | 1010 | ||