-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 @@ -11,23 +11,26 @@ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "today.h" #include <qpe/qpeapplication.h> +QPEApplication *todayApp; + int main( int argc, char ** argv ) { QPEApplication a(argc, argv); + todayApp=&a; Today t; t.setCaption( Today::tr("Today") ); a.showMainWidget(&t); return a.exec(); } 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 @@ -17,24 +17,25 @@ * * ***************************************************************************/ #include "today.h" #include <qpe/timestring.h> #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qprocess.h> #include <qpe/resource.h> #include <qpe/contact.h> #include <qpe/global.h> +#include <qpe/qpeapplication.h> #include <qdir.h> #include <qfile.h> #include <qdatetime.h> #include <qtextstream.h> #include <qcheckbox.h> #include <qspinbox.h> #include <qpushbutton.h> #include <qlabel.h> #include <qtimer.h> #include <qpixmap.h> #include <qfileinfo.h> @@ -397,33 +398,33 @@ void Today::getTodo() { /* * launches datebook */ void Today::startDatebook() { QCopEnvelope e("QPE/System", "execute(QString)"); e << QString("datebook"); } /* * starts the edit dialog as known from datebook */ + +extern QPEApplication *todayApp; + void Today::editEvent(const Event &e) { startDatebook(); - //Dissabled for now as uid's not working properly - /* - while(!QCopChannel::isRegistered("QPE/Datebook")) sleep(1); - QCopEnvelope env("QPE/Datebook", "editEvent(int)"); - env << e.uid(); - */ + while(!QCopChannel::isRegistered("QPE/Datebook")) todayApp->processEvents(); + QCopEnvelope env("QPE/Datebook", "editEvent(int)"); + env << e.uid(); } /* * launches todolist */ void Today::startTodo() { QCopEnvelope e("QPE/System", "execute(QString)"); e << QString("todolist"); } /* * launch opiemail |