-rw-r--r-- | core/pim/today/changelog | 6 | ||||
-rw-r--r-- | core/pim/today/opie-today.control | 2 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 45 | ||||
-rw-r--r-- | core/pim/today/today.h | 2 |
4 files changed, 41 insertions, 14 deletions
diff --git a/core/pim/today/changelog b/core/pim/today/changelog index ded4458..d0dd966 100644 --- a/core/pim/today/changelog +++ b/core/pim/today/changelog @@ -1 +1,7 @@ +0.2.9 + +* Many bugfixes. +* Today now apparently sorts the dates _allways_ right, i would assume it +to be a qt bug + 0.2.8 diff --git a/core/pim/today/opie-today.control b/core/pim/today/opie-today.control index 5ad8f01..f875624 100644 --- a/core/pim/today/opie-today.control +++ b/core/pim/today/opie-today.control @@ -5,3 +5,3 @@ Maintainer: Maximilian Reiß <max.reiss@gmx.de> Architecture: arm -Version: 0.2.8-$SUB_VERSION +Version: 0.2.9-$SUB_VERSION Depends: opie-base ($QPE_VERSION) diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 1cdc6b4..81d4d36 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -42,9 +42,8 @@ #include <qlayout.h> +#include <qtl.h> //#include <iostream.h> -//#include <unistd.h> +#include <unistd.h> #include <stdlib.h> - - int MAX_LINES_TASK; @@ -64,3 +63,3 @@ int NEW_START=1; Today::Today( QWidget* parent, const char* name, WFlags fl ) - : TodayBase( parent, name, fl ) { + : TodayBase( parent, name, fl ), AllDateBookEvents(NULL) { QObject::connect( (QObject*)PushButton1, SIGNAL( clicked() ), this, SLOT(startConfig() ) ); @@ -197,2 +196,3 @@ void Today::startConfig() { cfg.write(); + NEW_START=1; draw(); @@ -207,3 +207,5 @@ void Today::getDates() { QDate date = QDate::currentDate(); - QWidget* AllDateBookEvents = new QWidget( ); + + if (AllDateBookEvents) delete AllDateBookEvents; + AllDateBookEvents = new QWidget( ); QVBoxLayout* layoutDates = new QVBoxLayout(AllDateBookEvents); @@ -212,2 +214,5 @@ void Today::getDates() { + qBubbleSort(list); + // printf("Get dates\n"); + Config config( "qpe" ); @@ -223,3 +228,2 @@ void Today::getDates() { - count++; @@ -230,2 +234,3 @@ void Today::getDates() { if (!ONLY_LATER) { + count++; DateBookEvent *l=new DateBookEvent(*it, AllDateBookEvents); @@ -233,4 +238,6 @@ void Today::getDates() { connect (l, SIGNAL(editEvent(const Event &)), - this, SIGNAL(editEvent(const Event &))); + this, SLOT(editEvent(const Event &))); } else if ((time.toString() <= TimeString::dateString((*it).event().end())) ) { + count++; + // show only later appointments @@ -239,9 +246,10 @@ void Today::getDates() { connect (l, SIGNAL(editEvent(const Event &)), - this, SIGNAL(editEvent(const Event &))); - } else { - QLabel* noMoreEvents = new QLabel(AllDateBookEvents); - noMoreEvents->setText("No more appointments today"); - layoutDates->addWidget(noMoreEvents); - } + this, SLOT(editEvent(const Event &))); + } } + } + if (ONLY_LATER && count==0) { + QLabel* noMoreEvents = new QLabel(AllDateBookEvents); + noMoreEvents->setText("No more appointments today"); + layoutDates->addWidget(noMoreEvents); } @@ -255,2 +263,3 @@ void Today::getDates() { sv1->addChild(AllDateBookEvents); + AllDateBookEvents->show(); @@ -395,2 +404,12 @@ void Today::startDatebook() { } +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(); + */ +} diff --git a/core/pim/today/today.h b/core/pim/today/today.h index b3f0654..0b4356c 100644 --- a/core/pim/today/today.h +++ b/core/pim/today/today.h @@ -49,2 +49,3 @@ class Today : public TodayBase { void draw(); + void editEvent(const Event &e); private: @@ -60,2 +61,3 @@ class Today : public TodayBase { todayconfig *conf; + QWidget* AllDateBookEvents; //Config cfg; |