-rw-r--r-- | core/pim/today/today.cpp | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 87a7970..0ab7a2a 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -39,12 +39,13 @@ #include <qtimer.h> #include <qpixmap.h> //#include <qfileinfo.h> #include <qlayout.h> #include <qtl.h> + //#include <iostream.h> #include <unistd.h> #include <stdlib.h> int MAX_LINES_TASK; int MAX_CHAR_CLIP; @@ -124,26 +125,27 @@ void Today::setOwnerField(QString &message) { /* * Autostart, uses the new (opie only) autostart method in the launcher code. * If registered against that today ist started on each resume. */ void Today::autoStart() { - // Config cfg("today"); - //cfg.setGroup("Autostart"); - //AUTOSTART = cfg.readNumEntry("autostart",1); - - if (AUTOSTART) { - QCopEnvelope e("QPE/System", "autoStart(QString, QString, QString)"); - e << QString("add"); - e << QString("today"); - e << AUTOSTART_TIMER; - } else { - QCopEnvelope e("QPE/System", "autoStart(QString, QString)"); - e << QString("remove"); - e << QString("today"); - } + Config cfg("today"); + cfg.setGroup("Autostart"); + int AUTOSTART = cfg.readNumEntry("autostart",1); + qDebug(QString("%1").arg(AUTOSTART)); + if (AUTOSTART) { + QCopEnvelope e("QPE/System", "autoStart(QString, QString, QString)"); + e << QString("add"); + e << QString("today"); + e << AUTOSTART_TIMER; + } else { + qDebug("Nun in else bei autostart"); + QCopEnvelope e("QPE/System", "autoStart(QString, QString)"); + e << QString("remove"); + e << QString("today"); + } } /* * Repaint method. Reread all fields. */ void Today::draw() { @@ -258,12 +260,13 @@ void Today::startConfig() { int notes = conf->CheckBox2->isChecked(); int maxcharclip = conf->SpinBox7->value(); int onlylater = conf->CheckBox3->isChecked(); int autostart = conf->CheckBoxAuto->isChecked(); int autostartdelay = conf->SpinBoxTime->value(); + cfg.writeEntry("maxlinestask",maxlinestask); cfg.writeEntry("maxcharclip", maxcharclip); cfg.writeEntry("maxlinesmeet",maxmeet); cfg.writeEntry("showlocation",location); cfg.writeEntry("shownotes", notes); cfg.writeEntry("onlylater", onlylater); @@ -272,12 +275,13 @@ void Today::startConfig() { cfg.writeEntry("autostartdelay", autostartdelay); // sync it to "disk" cfg.write(); NEW_START=1; draw(); + AUTOSTART=autostart; autoStart(); } /* * Get all events that are in the datebook xml file for today @@ -450,13 +454,13 @@ void Today::startTodo() { */ void Today::startMail() { QCopEnvelope e("QPE/System", "execute(QString)"); e << QString("opiemail"); //Right now start both, maybe decide which to rum via config file .. QCopEnvelope f("QPE/System", "execute(QString)"); - e << QString("qtmail"); + f << QString("qtmail"); } Today::~Today() { } |