summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 69a0f75..06cfa01 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -48,27 +48,28 @@
48#include <stdlib.h> 48#include <stdlib.h>
49 49
50int MAX_LINES_TASK; 50int MAX_LINES_TASK;
51int MAX_CHAR_CLIP; 51int MAX_CHAR_CLIP;
52int MAX_LINES_MEET; 52int MAX_LINES_MEET;
53int SHOW_LOCATION; 53int SHOW_LOCATION;
54int SHOW_NOTES; 54int SHOW_NOTES;
55// show only later dates 55// show only later dates
56int ONLY_LATER; 56int ONLY_LATER;
57int AUTOSTART; 57int AUTOSTART;
58int NEW_START=1; 58int NEW_START=1;
59QString AUTOSTART_TIMER; 59QString AUTOSTART_TIMER;
60int NEXTDAYS=1;
60 61
61/* 62
62 * Constructs a Example which is a child of 'parent', with the 63/* Constructs a Example which is a child of 'parent', with the
63 * name 'name' and widget flags set to 'f' 64 * name 'name' and widget flags set to 'f'
64 */ 65 */
65Today::Today( QWidget* parent, const char* name, WFlags fl ) 66Today::Today( QWidget* parent, const char* name, WFlags fl )
66 : TodayBase( parent, name, fl ), AllDateBookEvents(NULL) { 67 : TodayBase( parent, name, fl ), AllDateBookEvents(NULL) {
67 QObject::connect( (QObject*)PushButton1, SIGNAL( clicked() ), this, SLOT(startConfig() ) ); 68 QObject::connect( (QObject*)PushButton1, SIGNAL( clicked() ), this, SLOT(startConfig() ) );
68 QObject::connect( (QObject*)TodoButton, SIGNAL( clicked() ), this, SLOT(startTodo() ) ); 69 QObject::connect( (QObject*)TodoButton, SIGNAL( clicked() ), this, SLOT(startTodo() ) );
69 QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startDatebook() ) ); 70 QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startDatebook() ) );
70 QObject::connect( (QObject*)MailButton, SIGNAL( clicked() ), this, SLOT(startMail() ) ); 71 QObject::connect( (QObject*)MailButton, SIGNAL( clicked() ), this, SLOT(startMail() ) );
71 QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT(editCard() ) ); 72 QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT(editCard() ) );
72 73
73#if defined(Q_WS_QWS) 74#if defined(Q_WS_QWS)
74#if !defined(QT_NO_COP) 75#if !defined(QT_NO_COP)
@@ -413,43 +414,46 @@ void Today::getTodo() {
413 output = tr("There are <b> %1</b> active tasks: <br>").arg(count); 414 output = tr("There are <b> %1</b> active tasks: <br>").arg(count);
414 } 415 }
415 output += tmpout; 416 output += tmpout;
416 } else { 417 } else {
417 output = tr("No active tasks"); 418 output = tr("No active tasks");
418 } 419 }
419 420
420 TodoField->setText(tr(output)); 421 TodoField->setText(tr(output));
421} 422}
422 423
423 424
424/* 425/*
425 * launch addressbook 426 * launch addressbook (personal card)
426 */ 427 */
427void Today::editCard() { 428void Today::editCard() {
428 QCopEnvelope e("QPE/System", "execute(QString)"); 429 QCopEnvelope w("QPE/System", "execute(QString)");
429 e << QString("addressbook"); 430 w << QString("addressbook");
431
432 QCopEnvelope v("QPE/Addressbook", "editPersonalAndClose()");
430} 433}
431 434
432/* 435/*
433 * launches datebook 436 * launches datebook
434 */ 437 */
435void Today::startDatebook() { 438void Today::startDatebook() {
436 QCopEnvelope e("QPE/System", "execute(QString)"); 439 QCopEnvelope e("QPE/System", "execute(QString)");
437 e << QString("datebook"); 440 e << QString("datebook");
438} 441}
439 442
440/* 443/*
441 * starts the edit dialog as known from datebook 444 * starts the edit dialog as known from datebook
442 */ 445 */
443 446
447
444extern QPEApplication *todayApp; 448extern QPEApplication *todayApp;
445 449
446void Today::editEvent(const Event &e) { 450void Today::editEvent(const Event &e) {
447 startDatebook(); 451 startDatebook();
448 452
449 while(!QCopChannel::isRegistered("QPE/Datebook")) todayApp->processEvents(); 453 while(!QCopChannel::isRegistered("QPE/Datebook")) todayApp->processEvents();
450 QCopEnvelope env("QPE/Datebook", "editEvent(int)"); 454 QCopEnvelope env("QPE/Datebook", "editEvent(int)");
451 env << e.uid(); 455 env << e.uid();
452} 456}
453 457
454/* 458/*
455 * launches todolist 459 * launches todolist