-rw-r--r-- | core/pim/today/main.cpp | 3 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 13 |
2 files changed, 10 insertions, 6 deletions
diff --git a/core/pim/today/main.cpp b/core/pim/today/main.cpp index 552db7c..72c0a2e 100644 --- a/core/pim/today/main.cpp +++ b/core/pim/today/main.cpp | |||
@@ -7,27 +7,30 @@ | |||
7 | * copyright : (c) 2002 by Maximilian Reiß | 7 | * copyright : (c) 2002 by Maximilian Reiß |
8 | * email : max.reiss@gmx.de | 8 | * email : max.reiss@gmx.de |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | /*************************************************************************** | 11 | /*************************************************************************** |
12 | * * | 12 | * * |
13 | * This program is free software; you can redistribute it and/or modify * | 13 | * This program is free software; you can redistribute it and/or modify * |
14 | * it under the terms of the GNU General Public License as published by * | 14 | * it under the terms of the GNU General Public License as published by * |
15 | * the Free Software Foundation; either version 2 of the License, or * | 15 | * the Free Software Foundation; either version 2 of the License, or * |
16 | * (at your option) any later version. * | 16 | * (at your option) any later version. * |
17 | * * | 17 | * * |
18 | ***************************************************************************/ | 18 | ***************************************************************************/ |
19 | 19 | ||
20 | #include "today.h" | 20 | #include "today.h" |
21 | #include <qpe/qpeapplication.h> | 21 | #include <qpe/qpeapplication.h> |
22 | 22 | ||
23 | QPEApplication *todayApp; | ||
24 | |||
23 | int main( int argc, char ** argv ) | 25 | int main( int argc, char ** argv ) |
24 | { | 26 | { |
25 | QPEApplication a(argc, argv); | 27 | QPEApplication a(argc, argv); |
28 | todayApp=&a; | ||
26 | 29 | ||
27 | Today t; | 30 | Today t; |
28 | 31 | ||
29 | t.setCaption( Today::tr("Today") ); | 32 | t.setCaption( Today::tr("Today") ); |
30 | a.showMainWidget(&t); | 33 | a.showMainWidget(&t); |
31 | 34 | ||
32 | return a.exec(); | 35 | return a.exec(); |
33 | } | 36 | } |
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index aef0a9b..66a4152 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -13,32 +13,33 @@ | |||
13 | * This program is free software; you can redistribute it and/or modify * | 13 | * This program is free software; you can redistribute it and/or modify * |
14 | * it under the terms of the GNU General Public License as published by * | 14 | * it under the terms of the GNU General Public License as published by * |
15 | * the Free Software Foundation; either version 2 of the License, or * | 15 | * the Free Software Foundation; either version 2 of the License, or * |
16 | * (at your option) any later version. * | 16 | * (at your option) any later version. * |
17 | * * | 17 | * * |
18 | ***************************************************************************/ | 18 | ***************************************************************************/ |
19 | 19 | ||
20 | #include "today.h" | 20 | #include "today.h" |
21 | 21 | ||
22 | #include <qpe/timestring.h> | 22 | #include <qpe/timestring.h> |
23 | #include <qpe/config.h> | 23 | #include <qpe/config.h> |
24 | #include <qpe/qcopenvelope_qws.h> | 24 | #include <qpe/qcopenvelope_qws.h> |
25 | #include <qpe/qprocess.h> | 25 | #include <qpe/qprocess.h> |
26 | #include <qpe/resource.h> | 26 | #include <qpe/resource.h> |
27 | #include <qpe/contact.h> | 27 | #include <qpe/contact.h> |
28 | #include <qpe/global.h> | 28 | #include <qpe/global.h> |
29 | #include <qpe/qpeapplication.h> | ||
29 | 30 | ||
30 | #include <qdir.h> | 31 | #include <qdir.h> |
31 | #include <qfile.h> | 32 | #include <qfile.h> |
32 | #include <qdatetime.h> | 33 | #include <qdatetime.h> |
33 | #include <qtextstream.h> | 34 | #include <qtextstream.h> |
34 | #include <qcheckbox.h> | 35 | #include <qcheckbox.h> |
35 | #include <qspinbox.h> | 36 | #include <qspinbox.h> |
36 | #include <qpushbutton.h> | 37 | #include <qpushbutton.h> |
37 | #include <qlabel.h> | 38 | #include <qlabel.h> |
38 | #include <qtimer.h> | 39 | #include <qtimer.h> |
39 | #include <qpixmap.h> | 40 | #include <qpixmap.h> |
40 | #include <qfileinfo.h> | 41 | #include <qfileinfo.h> |
41 | #include <qlayout.h> | 42 | #include <qlayout.h> |
42 | #include <qtl.h> | 43 | #include <qtl.h> |
43 | 44 | ||
44 | //#include <iostream.h> | 45 | //#include <iostream.h> |
@@ -393,41 +394,41 @@ void Today::getTodo() { | |||
393 | } | 394 | } |
394 | 395 | ||
395 | TodoField->setText(tr(output)); | 396 | TodoField->setText(tr(output)); |
396 | } | 397 | } |
397 | 398 | ||
398 | /* | 399 | /* |
399 | * launches datebook | 400 | * launches datebook |
400 | */ | 401 | */ |
401 | void Today::startDatebook() { | 402 | void Today::startDatebook() { |
402 | QCopEnvelope e("QPE/System", "execute(QString)"); | 403 | QCopEnvelope e("QPE/System", "execute(QString)"); |
403 | e << QString("datebook"); | 404 | e << QString("datebook"); |
404 | } | 405 | } |
405 | 406 | ||
406 | /* | 407 | /* |
407 | * starts the edit dialog as known from datebook | 408 | * starts the edit dialog as known from datebook |
408 | */ | 409 | */ |
410 | |||
411 | extern QPEApplication *todayApp; | ||
412 | |||
409 | void Today::editEvent(const Event &e) { | 413 | void Today::editEvent(const Event &e) { |
410 | startDatebook(); | 414 | startDatebook(); |
411 | 415 | ||
412 | //Dissabled for now as uid's not working properly | 416 | while(!QCopChannel::isRegistered("QPE/Datebook")) todayApp->processEvents(); |
413 | /* | 417 | QCopEnvelope env("QPE/Datebook", "editEvent(int)"); |
414 | while(!QCopChannel::isRegistered("QPE/Datebook")) sleep(1); | 418 | env << e.uid(); |
415 | QCopEnvelope env("QPE/Datebook", "editEvent(int)"); | ||
416 | env << e.uid(); | ||
417 | */ | ||
418 | } | 419 | } |
419 | 420 | ||
420 | /* | 421 | /* |
421 | * launches todolist | 422 | * launches todolist |
422 | */ | 423 | */ |
423 | void Today::startTodo() { | 424 | void Today::startTodo() { |
424 | QCopEnvelope e("QPE/System", "execute(QString)"); | 425 | QCopEnvelope e("QPE/System", "execute(QString)"); |
425 | e << QString("todolist"); | 426 | e << QString("todolist"); |
426 | } | 427 | } |
427 | 428 | ||
428 | /* | 429 | /* |
429 | * launch opiemail | 430 | * launch opiemail |
430 | */ | 431 | */ |
431 | void Today::startMail() { | 432 | void Today::startMail() { |
432 | QCopEnvelope e("QPE/System", "execute(QString)"); | 433 | QCopEnvelope e("QPE/System", "execute(QString)"); |
433 | e << QString("opiemail"); | 434 | e << QString("opiemail"); |