-rw-r--r-- | korganizer/mainwindow.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 2f286e0..ec69b11 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -18,48 +18,49 @@ | |||
18 | #include <qmap.h> | 18 | #include <qmap.h> |
19 | #include <qwmatrix.h> | 19 | #include <qwmatrix.h> |
20 | #include <qtextbrowser.h> | 20 | #include <qtextbrowser.h> |
21 | #include <qtextstream.h> | 21 | #include <qtextstream.h> |
22 | #ifndef DESKTOP_VERSION | 22 | #ifndef DESKTOP_VERSION |
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | #include <qpe/qpemenubar.h> | 24 | #include <qpe/qpemenubar.h> |
25 | #include <qpe/qpetoolbar.h> | 25 | #include <qpe/qpetoolbar.h> |
26 | #include <qpe/resource.h> | 26 | #include <qpe/resource.h> |
27 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
28 | #include <qtopia/alarmserver.h> | 28 | #include <qtopia/alarmserver.h> |
29 | #include <qtopia/qcopenvelope_qws.h> | 29 | #include <qtopia/qcopenvelope_qws.h> |
30 | #include <unistd.h> // for sleep | 30 | #include <unistd.h> // for sleep |
31 | #else | 31 | #else |
32 | #include <qmenubar.h> | 32 | #include <qmenubar.h> |
33 | #include <qtoolbar.h> | 33 | #include <qtoolbar.h> |
34 | #include <qapplication.h> | 34 | #include <qapplication.h> |
35 | //#include <resource.h> | 35 | //#include <resource.h> |
36 | 36 | ||
37 | #endif | 37 | #endif |
38 | #include <libkcal/calendarlocal.h> | 38 | #include <libkcal/calendarlocal.h> |
39 | #include <libkcal/todo.h> | 39 | #include <libkcal/todo.h> |
40 | #include <libkcal/phoneformat.h> | 40 | #include <libkcal/phoneformat.h> |
41 | #include <libkdepim/ksyncprofile.h> | 41 | #include <libkdepim/ksyncprofile.h> |
42 | #include <libkdepim/phoneaccess.h> | ||
42 | #include <libkcal/kincidenceformatter.h> | 43 | #include <libkcal/kincidenceformatter.h> |
43 | #include <libkdepim/kpimglobalprefs.h> | 44 | #include <libkdepim/kpimglobalprefs.h> |
44 | 45 | ||
45 | #include "calendarview.h" | 46 | #include "calendarview.h" |
46 | #include "koviewmanager.h" | 47 | #include "koviewmanager.h" |
47 | #include "datenavigator.h" | 48 | #include "datenavigator.h" |
48 | #include "koagendaview.h" | 49 | #include "koagendaview.h" |
49 | #include "koagenda.h" | 50 | #include "koagenda.h" |
50 | #include "kodialogmanager.h" | 51 | #include "kodialogmanager.h" |
51 | #include "kdialogbase.h" | 52 | #include "kdialogbase.h" |
52 | #include "kapplication.h" | 53 | #include "kapplication.h" |
53 | #include "kofilterview.h" | 54 | #include "kofilterview.h" |
54 | #include "kstandarddirs.h" | 55 | #include "kstandarddirs.h" |
55 | #include "koprefs.h" | 56 | #include "koprefs.h" |
56 | #include "kfiledialog.h" | 57 | #include "kfiledialog.h" |
57 | #include "koglobals.h" | 58 | #include "koglobals.h" |
58 | #include "kglobal.h" | 59 | #include "kglobal.h" |
59 | #include "klocale.h" | 60 | #include "klocale.h" |
60 | #include "kconfig.h" | 61 | #include "kconfig.h" |
61 | #include "simplealarmclient.h" | 62 | #include "simplealarmclient.h" |
62 | #include "externalapphandler.h" | 63 | #include "externalapphandler.h" |
63 | 64 | ||
64 | using namespace KCal; | 65 | using namespace KCal; |
65 | #ifndef _WIN32_ | 66 | #ifndef _WIN32_ |
@@ -1211,50 +1212,50 @@ void MainWindow::exportToPhone( int mode ) | |||
1211 | QDateTime dt; | 1212 | QDateTime dt; |
1212 | if ( incidence->type() == "Todo" ) { | 1213 | if ( incidence->type() == "Todo" ) { |
1213 | Todo * t = (Todo*)incidence; | 1214 | Todo * t = (Todo*)incidence; |
1214 | if ( t->hasDueDate() ) | 1215 | if ( t->hasDueDate() ) |
1215 | dt = t->dtDue(); | 1216 | dt = t->dtDue(); |
1216 | else | 1217 | else |
1217 | dt = cur.addSecs( 62 ); | 1218 | dt = cur.addSecs( 62 ); |
1218 | } | 1219 | } |
1219 | else { | 1220 | else { |
1220 | bool ok; | 1221 | bool ok; |
1221 | dt = incidence->getNextOccurence( cur, &ok ); | 1222 | dt = incidence->getNextOccurence( cur, &ok ); |
1222 | if ( !ok ) | 1223 | if ( !ok ) |
1223 | dt = cur.addSecs( -62 ); | 1224 | dt = cur.addSecs( -62 ); |
1224 | } | 1225 | } |
1225 | if ( dt < cur || dt > end ) { | 1226 | if ( dt < cur || dt > end ) { |
1226 | add = false; | 1227 | add = false; |
1227 | } | 1228 | } |
1228 | } | 1229 | } |
1229 | if ( add ) { | 1230 | if ( add ) { |
1230 | Incidence *in = incidence->clone(); | 1231 | Incidence *in = incidence->clone(); |
1231 | cal->addIncidence( in ); | 1232 | cal->addIncidence( in ); |
1232 | } | 1233 | } |
1233 | } | 1234 | } |
1234 | incidence = delSel.next(); | 1235 | incidence = delSel.next(); |
1235 | } | 1236 | } |
1236 | PhoneFormat::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, | 1237 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, |
1237 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, | 1238 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, |
1238 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1239 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1239 | 1240 | ||
1240 | setCaption( i18n("Writing to phone...")); | 1241 | setCaption( i18n("Writing to phone...")); |
1241 | if ( PhoneFormat::writeToPhone( cal ) ) | 1242 | if ( PhoneFormat::writeToPhone( cal ) ) |
1242 | setCaption( i18n("Export to phone successful!")); | 1243 | setCaption( i18n("Export to phone successful!")); |
1243 | else | 1244 | else |
1244 | setCaption( i18n("Error exporting to phone!")); | 1245 | setCaption( i18n("Error exporting to phone!")); |
1245 | delete cal; | 1246 | delete cal; |
1246 | } | 1247 | } |
1247 | 1248 | ||
1248 | 1249 | ||
1249 | void MainWindow::setDefaultPreferences() | 1250 | void MainWindow::setDefaultPreferences() |
1250 | { | 1251 | { |
1251 | KOPrefs *p = KOPrefs::instance(); | 1252 | KOPrefs *p = KOPrefs::instance(); |
1252 | 1253 | ||
1253 | p->mCompactDialogs = true; | 1254 | p->mCompactDialogs = true; |
1254 | p->mConfirm = true; | 1255 | p->mConfirm = true; |
1255 | // p->mEnableQuickTodo = false; | 1256 | // p->mEnableQuickTodo = false; |
1256 | 1257 | ||
1257 | } | 1258 | } |
1258 | 1259 | ||
1259 | QString MainWindow::resourcePath() | 1260 | QString MainWindow::resourcePath() |
1260 | { | 1261 | { |