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 | |||
@@ -62,48 +62,49 @@ | |||
62 | #include <krun.h> | 62 | #include <krun.h> |
63 | #include <kdirwatch.h> | 63 | #include <kdirwatch.h> |
64 | #include <libkdepim/kdatepicker.h> | 64 | #include <libkdepim/kdatepicker.h> |
65 | #include <libkdepim/ksyncprofile.h> | 65 | #include <libkdepim/ksyncprofile.h> |
66 | 66 | ||
67 | #include <libkcal/vcaldrag.h> | 67 | #include <libkcal/vcaldrag.h> |
68 | #include <libkcal/icaldrag.h> | 68 | #include <libkcal/icaldrag.h> |
69 | #include <libkcal/icalformat.h> | 69 | #include <libkcal/icalformat.h> |
70 | #include <libkcal/vcalformat.h> | 70 | #include <libkcal/vcalformat.h> |
71 | #include <libkcal/scheduler.h> | 71 | #include <libkcal/scheduler.h> |
72 | #include <libkcal/calendarlocal.h> | 72 | #include <libkcal/calendarlocal.h> |
73 | #include <libkcal/journal.h> | 73 | #include <libkcal/journal.h> |
74 | #include <libkcal/calfilter.h> | 74 | #include <libkcal/calfilter.h> |
75 | #include <libkcal/attendee.h> | 75 | #include <libkcal/attendee.h> |
76 | #include <libkcal/dndfactory.h> | 76 | #include <libkcal/dndfactory.h> |
77 | #include <libkcal/freebusy.h> | 77 | #include <libkcal/freebusy.h> |
78 | #include <libkcal/filestorage.h> | 78 | #include <libkcal/filestorage.h> |
79 | #include <libkcal/calendarresources.h> | 79 | #include <libkcal/calendarresources.h> |
80 | #include <libkcal/qtopiaformat.h> | 80 | #include <libkcal/qtopiaformat.h> |
81 | #include "../kalarmd/alarmdialog.h" | 81 | #include "../kalarmd/alarmdialog.h" |
82 | 82 | ||
83 | #ifndef DESKTOP_VERSION | 83 | #ifndef DESKTOP_VERSION |
84 | #include <libkcal/sharpformat.h> | 84 | #include <libkcal/sharpformat.h> |
85 | #endif | 85 | #endif |
86 | #include <libkcal/phoneformat.h> | ||
86 | #ifndef KORG_NOMAIL | 87 | #ifndef KORG_NOMAIL |
87 | #include "komailclient.h" | 88 | #include "komailclient.h" |
88 | #endif | 89 | #endif |
89 | #ifndef KORG_NOPRINTER | 90 | #ifndef KORG_NOPRINTER |
90 | #include "calprinter.h" | 91 | #include "calprinter.h" |
91 | #endif | 92 | #endif |
92 | #ifndef KORG_NOPLUGINS | 93 | #ifndef KORG_NOPLUGINS |
93 | #include "kocore.h" | 94 | #include "kocore.h" |
94 | #endif | 95 | #endif |
95 | #include "koeventeditor.h" | 96 | #include "koeventeditor.h" |
96 | #include "kotodoeditor.h" | 97 | #include "kotodoeditor.h" |
97 | #include "koprefs.h" | 98 | #include "koprefs.h" |
98 | #include "koeventviewerdialog.h" | 99 | #include "koeventviewerdialog.h" |
99 | #include "publishdialog.h" | 100 | #include "publishdialog.h" |
100 | #include "kofilterview.h" | 101 | #include "kofilterview.h" |
101 | #include "koglobals.h" | 102 | #include "koglobals.h" |
102 | #include "koviewmanager.h" | 103 | #include "koviewmanager.h" |
103 | #include "koagendaview.h" | 104 | #include "koagendaview.h" |
104 | #include "kodialogmanager.h" | 105 | #include "kodialogmanager.h" |
105 | #include "outgoingdialog.h" | 106 | #include "outgoingdialog.h" |
106 | #include "incomingdialog.h" | 107 | #include "incomingdialog.h" |
107 | #include "statusdialog.h" | 108 | #include "statusdialog.h" |
108 | #include "kdatenavigator.h" | 109 | #include "kdatenavigator.h" |
109 | #include "kotodoview.h" | 110 | #include "kotodoview.h" |
@@ -1154,112 +1155,135 @@ bool CalendarView::syncCalendar(QString filename, int mode) | |||
1154 | bool syncOK = false; | 1155 | bool syncOK = false; |
1155 | storage->setFileName( filename ); | 1156 | storage->setFileName( filename ); |
1156 | // qDebug("loading ... "); | 1157 | // qDebug("loading ... "); |
1157 | if ( storage->load(KOPrefs::instance()->mUseQuicksave) ) { | 1158 | if ( storage->load(KOPrefs::instance()->mUseQuicksave) ) { |
1158 | getEventViewerDialog()->setSyncMode( true ); | 1159 | getEventViewerDialog()->setSyncMode( true ); |
1159 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); | 1160 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); |
1160 | getEventViewerDialog()->setSyncMode( false ); | 1161 | getEventViewerDialog()->setSyncMode( false ); |
1161 | if ( syncOK ) { | 1162 | if ( syncOK ) { |
1162 | if ( KOPrefs::instance()->mWriteBackFile ) | 1163 | if ( KOPrefs::instance()->mWriteBackFile ) |
1163 | { | 1164 | { |
1164 | storage->setSaveFormat( new ICalFormat( KOPrefs::instance()->mUseQuicksave) ); | 1165 | storage->setSaveFormat( new ICalFormat( KOPrefs::instance()->mUseQuicksave) ); |
1165 | storage->save(); | 1166 | storage->save(); |
1166 | } | 1167 | } |
1167 | } | 1168 | } |
1168 | setModified( true ); | 1169 | setModified( true ); |
1169 | } | 1170 | } |
1170 | delete storage; | 1171 | delete storage; |
1171 | delete calendar; | 1172 | delete calendar; |
1172 | if ( syncOK ) | 1173 | if ( syncOK ) |
1173 | updateView(); | 1174 | updateView(); |
1174 | return syncOK; | 1175 | return syncOK; |
1175 | } | 1176 | } |
1176 | void CalendarView::syncPhone() | 1177 | 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"; |
1185 | if ( KOPrefs::instance()->mAskForPreferences ) | 1185 | if ( KOPrefs::instance()->mAskForPreferences ) |
1186 | edit_sync_options(); | 1186 | edit_sync_options(); |
1187 | qApp->processEvents(); | 1187 | qApp->processEvents(); |
1188 | CalendarLocal* calendar = new CalendarLocal(); | 1188 | CalendarLocal* calendar = new CalendarLocal(); |
1189 | calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); | 1189 | calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); |
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 ); |
1194 | syncOK = synchronizeCalendar( mCalendar, calendar, KOPrefs::instance()->mSyncAlgoPrefs ); | 1209 | syncOK = synchronizeCalendar( mCalendar, calendar, KOPrefs::instance()->mSyncAlgoPrefs ); |
1195 | getEventViewerDialog()->setSyncMode( false ); | 1210 | getEventViewerDialog()->setSyncMode( false ); |
1196 | qApp->processEvents(); | 1211 | qApp->processEvents(); |
1197 | if ( syncOK ) { | 1212 | if ( syncOK ) { |
1198 | if ( KOPrefs::instance()->mWriteBackFile ) | 1213 | if ( KOPrefs::instance()->mWriteBackFile ) |
1199 | { | 1214 | { |
1200 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); | 1215 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); |
1201 | Incidence* inc = iL.first(); | 1216 | Incidence* inc = iL.first(); |
1202 | /* obsolete | 1217 | /* obsolete |
1203 | while ( inc ) { | 1218 | while ( inc ) { |
1204 | inc->setZaurusStat( inc->revision () ); | 1219 | inc->setZaurusStat( inc->revision () ); |
1205 | inc = iL.next(); | 1220 | inc = iL.next(); |
1206 | } | 1221 | } |
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(); |
1211 | inc = iL.first(); | 1230 | inc = iL.first(); |
1212 | Incidence* loc; | 1231 | Incidence* loc; |
1213 | while ( inc ) { | 1232 | while ( inc ) { |
1214 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { | 1233 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { |
1215 | loc = mCalendar->incidence(inc->uid() ); | 1234 | loc = mCalendar->incidence(inc->uid() ); |
1216 | if ( loc ) { | 1235 | if ( loc ) { |
1217 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); | 1236 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); |
1218 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); | 1237 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); |
1219 | } | 1238 | } |
1220 | } | 1239 | } |
1221 | inc = iL.next(); | 1240 | inc = iL.next(); |
1222 | } | 1241 | } |
1223 | Incidence* lse = getLastSyncEvent(); | 1242 | Incidence* lse = getLastSyncEvent(); |
1224 | if ( lse ) { | 1243 | if ( lse ) { |
1225 | lse->setReadOnly( false ); | 1244 | lse->setReadOnly( false ); |
1226 | lse->setDescription( "" ); | 1245 | lse->setDescription( "" ); |
1227 | lse->setReadOnly( true ); | 1246 | lse->setReadOnly( true ); |
1228 | } | 1247 | } |
1229 | } | 1248 | } |
1230 | } | 1249 | } |
1231 | setModified( true ); | 1250 | setModified( true ); |
1232 | } else { | 1251 | } else { |
1233 | QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; | 1252 | QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; |
1234 | QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), | 1253 | QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), |
1235 | question, i18n("Ok")) ; | 1254 | question, i18n("Ok")) ; |
1236 | 1255 | ||
1237 | } | 1256 | } |
1238 | delete calendar; | 1257 | delete calendar; |
1239 | updateView(); | 1258 | updateView(); |
1240 | return ;//syncOK; | 1259 | return ;//syncOK; |
1241 | #endif | 1260 | |
1261 | } | ||
1262 | void CalendarView::syncSharp() | ||
1263 | { | ||
1264 | syncExternal( 0 ); | ||
1265 | |||
1242 | } | 1266 | } |
1243 | 1267 | ||
1244 | 1268 | ||
1245 | #include <kabc/stdaddressbook.h> | 1269 | #include <kabc/stdaddressbook.h> |
1246 | bool CalendarView::importBday() | 1270 | bool CalendarView::importBday() |
1247 | { | 1271 | { |
1248 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); | 1272 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); |
1249 | KABC::AddressBook::Iterator it; | 1273 | KABC::AddressBook::Iterator it; |
1250 | int count = 0; | 1274 | int count = 0; |
1251 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 1275 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
1252 | ++count; | 1276 | ++count; |
1253 | } | 1277 | } |
1254 | QProgressBar bar(count,0 ); | 1278 | QProgressBar bar(count,0 ); |
1255 | int w = 300; | 1279 | int w = 300; |
1256 | if ( QApplication::desktop()->width() < 320 ) | 1280 | if ( QApplication::desktop()->width() < 320 ) |
1257 | w = 220; | 1281 | w = 220; |
1258 | int h = bar.sizeHint().height() ; | 1282 | int h = bar.sizeHint().height() ; |
1259 | int dw = QApplication::desktop()->width(); | 1283 | int dw = QApplication::desktop()->width(); |
1260 | int dh = QApplication::desktop()->height(); | 1284 | int dh = QApplication::desktop()->height(); |
1261 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 1285 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
1262 | bar.show(); | 1286 | bar.show(); |
1263 | bar.setCaption (i18n("Reading addressbook - close to abort!") ); | 1287 | bar.setCaption (i18n("Reading addressbook - close to abort!") ); |
1264 | qApp->processEvents(); | 1288 | qApp->processEvents(); |
1265 | count = 0; | 1289 | count = 0; |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index b2838db..a3315ad 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -405,48 +405,49 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
405 | void toggleDateNavigatorWidget(); | 405 | void toggleDateNavigatorWidget(); |
406 | void toggleAllDaySize(); | 406 | void toggleAllDaySize(); |
407 | void dialogClosing(Incidence *); | 407 | void dialogClosing(Incidence *); |
408 | 408 | ||
409 | /** Look for new messages in the inbox */ | 409 | /** Look for new messages in the inbox */ |
410 | void lookForIncomingMessages(); | 410 | void lookForIncomingMessages(); |
411 | /** Look for new messages in the outbox */ | 411 | /** Look for new messages in the outbox */ |
412 | void lookForOutgoingMessages(); | 412 | void lookForOutgoingMessages(); |
413 | 413 | ||
414 | void processMainViewSelection( Incidence * ); | 414 | void processMainViewSelection( Incidence * ); |
415 | void processTodoListSelection( Incidence * ); | 415 | void processTodoListSelection( Incidence * ); |
416 | 416 | ||
417 | void processIncidenceSelection( Incidence * ); | 417 | void processIncidenceSelection( Incidence * ); |
418 | 418 | ||
419 | void purgeCompleted(); | 419 | void purgeCompleted(); |
420 | bool removeCompletedSubTodos( Todo* ); | 420 | bool removeCompletedSubTodos( Todo* ); |
421 | void slotCalendarChanged(); | 421 | void slotCalendarChanged(); |
422 | bool importBday(); | 422 | bool importBday(); |
423 | bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); | 423 | bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); |
424 | bool importQtopia( const QString &categoriesFile, | 424 | bool importQtopia( const QString &categoriesFile, |
425 | const QString &datebookFile, | 425 | const QString &datebookFile, |
426 | const QString &tasklistFile ); | 426 | const QString &tasklistFile ); |
427 | void syncSharp( ); | 427 | void syncSharp( ); |
428 | void syncPhone( ); | 428 | void syncPhone( ); |
429 | void syncExternal( int mode ); | ||
429 | void slotSelectPickerDate( QDate ) ; | 430 | void slotSelectPickerDate( QDate ) ; |
430 | void showDatePicker( ) ; | 431 | void showDatePicker( ) ; |
431 | void moveIncidence(Incidence *) ; | 432 | void moveIncidence(Incidence *) ; |
432 | void beamIncidence(Incidence *) ; | 433 | void beamIncidence(Incidence *) ; |
433 | void beamCalendar() ; | 434 | void beamCalendar() ; |
434 | void beamFilteredCalendar() ; | 435 | void beamFilteredCalendar() ; |
435 | void beamIncidenceList(QPtrList<Incidence>) ; | 436 | void beamIncidenceList(QPtrList<Incidence>) ; |
436 | void manageCategories(); | 437 | void manageCategories(); |
437 | int addCategories(); | 438 | int addCategories(); |
438 | void removeCategories(); | 439 | void removeCategories(); |
439 | void setSyncDevice( QString ); | 440 | void setSyncDevice( QString ); |
440 | void setSyncName( QString ); | 441 | void setSyncName( QString ); |
441 | protected slots: | 442 | protected slots: |
442 | void timerAlarm(); | 443 | void timerAlarm(); |
443 | void suspendAlarm(); | 444 | void suspendAlarm(); |
444 | void beamDone( Ir *ir ); | 445 | void beamDone( Ir *ir ); |
445 | /** Select a view or adapt the current view to display the specified dates. */ | 446 | /** Select a view or adapt the current view to display the specified dates. */ |
446 | void showDates( const KCal::DateList & ); | 447 | void showDates( const KCal::DateList & ); |
447 | void selectWeekNum ( int ); | 448 | void selectWeekNum ( int ); |
448 | 449 | ||
449 | public: | 450 | public: |
450 | // show a standard warning | 451 | // show a standard warning |
451 | // returns KMsgBox::yesNoCancel() | 452 | // returns KMsgBox::yesNoCancel() |
452 | int msgCalModified(); | 453 | int msgCalModified(); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 062c95f..cce182a 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -979,49 +979,55 @@ void MainWindow::slotSyncMenu( int action ) | |||
979 | mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); | 979 | mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); |
980 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); | 980 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); |
981 | KSyncProfile* temp = new KSyncProfile (); | 981 | KSyncProfile* temp = new KSyncProfile (); |
982 | temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]); | 982 | temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]); |
983 | temp->readConfig(&config); | 983 | temp->readConfig(&config); |
984 | KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences(); | 984 | KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences(); |
985 | KOPrefs::instance()->mSyncAlgoPrefs = temp->getSyncPrefs(); | 985 | KOPrefs::instance()->mSyncAlgoPrefs = temp->getSyncPrefs(); |
986 | KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile(); | 986 | KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile(); |
987 | KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting(); | 987 | KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting(); |
988 | KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync(); | 988 | KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync(); |
989 | if ( action == 1000 ) { | 989 | if ( action == 1000 ) { |
990 | syncSharp(); | 990 | syncSharp(); |
991 | 991 | ||
992 | } else if ( action == 1001 ) { | 992 | } else if ( action == 1001 ) { |
993 | syncLocalFile(); | 993 | syncLocalFile(); |
994 | 994 | ||
995 | } else if ( action == 1002 ) { | 995 | } else if ( action == 1002 ) { |
996 | quickSyncLocalFile(); | 996 | quickSyncLocalFile(); |
997 | 997 | ||
998 | } else if ( action >= 1003 ) { | 998 | } else if ( action >= 1003 ) { |
999 | if ( temp->getIsLocalFileSync() ) { | 999 | if ( temp->getIsLocalFileSync() ) { |
1000 | if ( syncWithFile( temp->getRemoteFileName( ), false ) ) | 1000 | if ( syncWithFile( temp->getRemoteFileName( ), false ) ) |
1001 | KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); | 1001 | KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); |
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 | ||
1005 | } | 1011 | } |
1006 | } | 1012 | } |
1007 | delete temp; | 1013 | delete temp; |
1008 | mBlockSaveFlag = false; | 1014 | mBlockSaveFlag = false; |
1009 | } | 1015 | } |
1010 | void MainWindow::setDefaultPreferences() | 1016 | void MainWindow::setDefaultPreferences() |
1011 | { | 1017 | { |
1012 | KOPrefs *p = KOPrefs::instance(); | 1018 | KOPrefs *p = KOPrefs::instance(); |
1013 | 1019 | ||
1014 | p->mCompactDialogs = true; | 1020 | p->mCompactDialogs = true; |
1015 | p->mConfirm = true; | 1021 | p->mConfirm = true; |
1016 | // p->mEnableQuickTodo = false; | 1022 | // p->mEnableQuickTodo = false; |
1017 | } | 1023 | } |
1018 | 1024 | ||
1019 | QString MainWindow::resourcePath() | 1025 | QString MainWindow::resourcePath() |
1020 | { | 1026 | { |
1021 | return KGlobal::iconLoader()->iconPath(); | 1027 | return KGlobal::iconLoader()->iconPath(); |
1022 | } | 1028 | } |
1023 | 1029 | ||
1024 | void MainWindow::displayText( QString text ,QString cap ) | 1030 | void MainWindow::displayText( QString text ,QString cap ) |
1025 | { | 1031 | { |
1026 | QDialog dia( this, "name", true ); ; | 1032 | QDialog dia( this, "name", true ); ; |
1027 | dia.setCaption( cap ); | 1033 | dia.setCaption( cap ); |