summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 6dac6d9..61bd0c4 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -77,67 +77,67 @@ Today::Today( QWidget* parent, const char* name, WFlags fl )
77 77
78 78
79 79
80 db = NULL; 80 db = NULL;
81 setOwnerField(); 81 setOwnerField();
82 todo = new ToDoDB; 82 todo = new ToDoDB;
83 getTodo(); 83 getTodo();
84 draw(); 84 draw();
85 autoStart(); 85 autoStart();
86} 86}
87 87
88/* 88/*
89 * Qcop receive method. 89 * Qcop receive method.
90 */ 90 */
91void Today::channelReceived(const QCString &msg, const QByteArray & data) { 91void Today::channelReceived(const QCString &msg, const QByteArray & data) {
92 QDataStream stream(data, IO_ReadOnly ); 92 QDataStream stream(data, IO_ReadOnly );
93 if ( msg == "message(QString)" ) { 93 if ( msg == "message(QString)" ) {
94 QString message; 94 QString message;
95 stream >> message; 95 stream >> message;
96 setOwnerField(message); 96 setOwnerField(message);
97 } 97 }
98 98
99} 99}
100 100
101/* 101/*
102 * Initialises the owner field with the default value, the username 102 * Initialises the owner field with the default value, the username
103 */ 103 */
104void Today::setOwnerField() { 104void Today::setOwnerField() {
105 QString file = Global::applicationFileName("addressbook", "businesscard.vcf"); 105 QString file = Global::applicationFileName("addressbook", "businesscard.vcf");
106 if (QFile::exists(file)) { 106 if (QFile::exists(file)) {
107 Contact cont = Contact::readVCard(file)[0]; 107 Contact cont = Contact::readVCard(file)[0];
108 QString returnString = cont.fullName(); 108 QString returnString = cont.fullName();
109 OwnerField->setText( tr ("<b>Owned by " + returnString + "</b>")); 109 OwnerField->setText( "<b>" +tr ("Owned by ") + returnString + "</b>");
110 } else { 110 } else {
111 OwnerField->setText( tr ("<b>Please fill out the business card </b>")); 111 OwnerField->setText( "<b>" + tr ("Please fill out the business card")+" </b>");
112 } 112 }
113} 113}
114 114
115/* 115/*
116 * Set the owner field with a given QString, for example per qcop. 116 * Set the owner field with a given QString, for example per qcop.
117 */ 117 */
118void Today::setOwnerField(QString &message) { 118void Today::setOwnerField(QString &message) {
119 if (!message.isEmpty()) { 119 if (!message.isEmpty()) {
120 OwnerField->setText("<b>" + message + "</b>"); 120 OwnerField->setText("<b>" + message + "</b>");
121 } 121 }
122} 122}
123 123
124/* 124/*
125 * Autostart, uses the new (opie only) autostart method in the launcher code. 125 * Autostart, uses the new (opie only) autostart method in the launcher code.
126 * If registered against that today ist started on each resume. 126 * If registered against that today ist started on each resume.
127 */ 127 */
128void Today::autoStart() { 128void Today::autoStart() {
129 Config cfg("today"); 129 Config cfg("today");
130 cfg.setGroup("Autostart"); 130 cfg.setGroup("Autostart");
131 AUTOSTART = cfg.readNumEntry("autostart",1); 131 AUTOSTART = cfg.readNumEntry("autostart",1);
132 if (AUTOSTART) { 132 if (AUTOSTART) {
133 QCopEnvelope e("QPE/System", "autoStart(QString,QString)"); 133 QCopEnvelope e("QPE/System", "autoStart(QString,QString)");
134 e << QString("add"); 134 e << QString("add");
135 e << QString("today"); 135 e << QString("today");
136 } else { 136 } else {
137 QCopEnvelope e("QPE/System", "autoStart(QString,QString)"); 137 QCopEnvelope e("QPE/System", "autoStart(QString,QString)");
138 e << QString("remove"); 138 e << QString("remove");
139 e << QString("today"); 139 e << QString("today");
140 } 140 }
141} 141}
142 142
143/* 143/*