author | llornkcor <llornkcor> | 2002-03-18 04:06:49 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-03-18 04:06:49 (UTC) |
commit | c41df1c96c7843ded6d63fcfb6f368b4173ca842 (patch) (side-by-side diff) | |
tree | 1ad241131ae50d41cc6d9dff8719864e68c27c14 | |
parent | 9fbc04992f0b19f3f8d0aa91f569f9faa0c562f8 (diff) | |
download | opie-c41df1c96c7843ded6d63fcfb6f368b4173ca842.zip opie-c41df1c96c7843ded6d63fcfb6f368b4173ca842.tar.gz opie-c41df1c96c7843ded6d63fcfb6f368b4173ca842.tar.bz2 |
heheheh.. no insulting the users, please
-rw-r--r-- | core/pim/today/today.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 08efe2d..1936518 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -60,97 +60,97 @@ int AUTOSTART; int NEW_START=1; /* * Constructs a Example which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ Today::Today( QWidget* parent, const char* name, WFlags fl ) : TodayBase( parent, name, fl ), AllDateBookEvents(NULL) { QObject::connect( (QObject*)PushButton1, SIGNAL( clicked() ), this, SLOT(startConfig() ) ); QObject::connect( (QObject*)TodoButton, SIGNAL( clicked() ), this, SLOT(startTodo() ) ); QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startDatebook() ) ); QObject::connect( (QObject*)MailButton, SIGNAL( clicked() ), this, SLOT(startMail() ) ); #if defined(Q_WS_QWS) #if !defined(QT_NO_COP) QCopChannel *todayChannel = new QCopChannel("QPE/Today" , this ); connect (todayChannel, SIGNAL( received(const QCString &, const QByteArray &)), this, SLOT ( channelReceived(const QCString &, const QByteArray &)) ); #endif #endif draw(); setOwnerField(); autoStart(); } /* * Qcop receive method. */ void Today::channelReceived(const QCString &msg, const QByteArray & data) { QDataStream stream(data, IO_ReadOnly ); if ( msg == "message(QString)" ) { QString message; stream >> message; setOwnerField(message); } } /* * Initialises the owner field with the default value, the username */ void Today::setOwnerField() { QString file = Global::applicationFileName("addressbook", "businesscard.vcf"); if (QFile::exists(file)) { Contact cont = Contact::readVCard(file)[0]; QString returnString = cont.fullName(); OwnerField->setText( tr ("<b>Owned by " + returnString + "</b>")); } else { - OwnerField->setText( tr ("<b>to lame to fill out the business card </b>")); + OwnerField->setText( tr ("<b>Please fill out the business card </b>")); } } /* * Set the owner field with a given QString, for example per qcop. */ void Today::setOwnerField(QString &message) { if (!message.isEmpty()) { OwnerField->setText("<b>" + message + "</b>"); } } /* * 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)"); e << QString("add"); e << QString("today"); } else { QCopEnvelope e("QPE/System", "autoStart(QString,QString)"); e << QString("remove"); e << QString("today"); } } /* * Repaint method. Reread all fields. */ void Today::draw() { init(); getDates(); getMail(); getTodo(); // how often refresh QTimer::singleShot( 10*1000, this, SLOT(draw() ) ); } /* * Check if the todolist.xml was modified (if there are new entries. * Returns true if it was modified. */ bool Today::checkIfModified() { |