summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-07 06:16:24 (UTC)
committer zautrix <zautrix>2005-02-07 06:16:24 (UTC)
commit363a0e27d630452762e76131b4606e14a3231f01 (patch) (unidiff)
tree11f423fbb1b29ad8315f2178d0a6ce20d7a36e7f
parent301a4a207171549bd87815705d8dcf32ad15559d (diff)
downloadkdepimpi-363a0e27d630452762e76131b4606e14a3231f01.zip
kdepimpi-363a0e27d630452762e76131b4606e14a3231f01.tar.gz
kdepimpi-363a0e27d630452762e76131b4606e14a3231f01.tar.bz2
another fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt1
-rw-r--r--korganizer/koeditorgeneraltodo.cpp6
2 files changed, 5 insertions, 2 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index ee37492..d52fad0 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1180,55 +1180,56 @@
1180{ "completed to-dos","erledigte Todos" }, 1180{ "completed to-dos","erledigte Todos" },
1181{ "events","Termine" }, 1181{ "events","Termine" },
1182{ "todos","Todos" }, 1182{ "todos","Todos" },
1183{ "journals","Journale" }, 1183{ "journals","Journale" },
1184{ "public","öffentl." }, 1184{ "public","öffentl." },
1185{ "private","privat" }, 1185{ "private","privat" },
1186{ "confidential","vertraul." }, 1186{ "confidential","vertraul." },
1187{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, 1187{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" },
1188{ "Yesterday","Gestern" }, 1188{ "Yesterday","Gestern" },
1189{ "Day after tomorrow","Übermorgen" }, 1189{ "Day after tomorrow","Übermorgen" },
1190{ "Tomorrow","Morgen" }, 1190{ "Tomorrow","Morgen" },
1191{ "Day before yesterday","Vorgestern" }, 1191{ "Day before yesterday","Vorgestern" },
1192{ "Size %1","Größe %1" }, 1192{ "Size %1","Größe %1" },
1193{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1193{ "New Agendasize: %1","Neue Agendagröße: %1" },
1194{ " (%1 y.)"," (%1 J.)" }, 1194{ " (%1 y.)"," (%1 J.)" },
1195{ "Allday:","Ganztägig:" }, 1195{ "Allday:","Ganztägig:" },
1196{ "compl.todos","erled.Todos" }, 1196{ "compl.todos","erled.Todos" },
1197{ "Day view","Tagesansicht" }, 1197{ "Day view","Tagesansicht" },
1198{ "Next days","Nächste Tage" }, 1198{ "Next days","Nächste Tage" },
1199{ "Next week","Nächste Woche" }, 1199{ "Next week","Nächste Woche" },
1200{ "Next two weeks","Nächste zwei Wochen" }, 1200{ "Next two weeks","Nächste zwei Wochen" },
1201{ "Next month","Nächster Monat" }, 1201{ "Next month","Nächster Monat" },
1202{ "Journal view","Journal" }, 1202{ "Journal view","Journal" },
1203{ "Display all opened","Zeige alle geöffnet" }, 1203{ "Display all opened","Zeige alle geöffnet" },
1204{ "Display all closed","Zeige alle geschlossen" }, 1204{ "Display all closed","Zeige alle geschlossen" },
1205{ "Display all flat","Zeige alle flach" }, 1205{ "Display all flat","Zeige alle flach" },
1206{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1206{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1207{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1207{ "Default todo done color:","Standard Todo erledigt Farbe" },
1208{ "Select week %1-%2","Wähle Woche %1-%2" }, 1208{ "Select week %1-%2","Wähle Woche %1-%2" },
1209{ "Select Week","Wähle Woche" }, 1209{ "Select Week","Wähle Woche" },
1210{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1210{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1211{ "Set Alarm!","Setze Alarm!" }, 1211{ "Set Alarm!","Setze Alarm!" },
1212{ "Canged alarm for %1 items","Alarm für %1 Items geändert" }, 1212{ "Canged alarm for %1 items","Alarm für %1 Items geändert" },
1213{ " and "," und " }, 1213{ " and "," und " },
1214{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1214{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1215{ "Mail to selected","Mail an Ausgewählte" }, 1215{ "Mail to selected","Mail an Ausgewählte" },
1216{ "Mail to all","Mail an Alle" }, 1216{ "Mail to all","Mail an Alle" },
1217{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1217{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1218{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1218{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1219{ " on"," am" }, 1219{ " on"," am" },
1220{ " completed on "," erledigt am " }, 1220{ " completed on "," erledigt am " },
1221{ "Save as Event template","Speichere als Vorlage" }, 1221{ "Save as Event template","Speichere als Vorlage" },
1222{ "Load Event template","Lade Termin Vorlage" }, 1222{ "Load Event template","Lade Termin Vorlage" },
1223{ "Save as Journal template","Speichere als Journal Vorlage" }, 1223{ "Save as Journal template","Speichere als Journal Vorlage" },
1224{ "Insert Journal template","Füge Journal Vorlage ein" }, 1224{ "Insert Journal template","Füge Journal Vorlage ein" },
1225{ "Sub todos:<br>","Unter Todos:<br>" }, 1225{ "Sub todos:<br>","Unter Todos:<br>" },
1226{ "Parent todo:<br>","Über Todo:<br>" }, 1226{ "Parent todo:<br>","Über Todo:<br>" },
1227{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1227{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1228{ " completed"," erledigt" },
1228{ "","" }, 1229{ "","" },
1229{ "","" }, 1230{ "","" },
1230{ "","" }, 1231{ "","" },
1231{ "","" }, 1232{ "","" },
1232{ "","" }, 1233{ "","" },
1233{ "","" }, 1234{ "","" },
1234{ "","" }, 1235{ "","" },
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index da5ef07..6370b54 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -188,98 +188,100 @@ void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout)
188void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout) 188void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout)
189{ 189{
190 QBoxLayout *statusLayout = new QHBoxLayout(topLayout); 190 QBoxLayout *statusLayout = new QHBoxLayout(topLayout);
191 191
192 initCompletion( parent, statusLayout ); 192 initCompletion( parent, statusLayout );
193 193
194 statusLayout->addStretch( 1 ); 194 statusLayout->addStretch( 1 );
195 195
196 initPriority( parent, statusLayout ); 196 initPriority( parent, statusLayout );
197} 197}
198 198
199void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay) 199void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay)
200{ 200{
201 201
202 mSummaryEdit->load(KOLocationBox::SUMMARYTODO); 202 mSummaryEdit->load(KOLocationBox::SUMMARYTODO);
203 mLocationEdit->load(KOLocationBox::LOCATION); 203 mLocationEdit->load(KOLocationBox::LOCATION);
204 KOEditorGeneral::setDefaults(allDay); 204 KOEditorGeneral::setDefaults(allDay);
205 205
206 mTimeButton->setChecked( !allDay ); 206 mTimeButton->setChecked( !allDay );
207 if(mTimeButton->isChecked()) { 207 if(mTimeButton->isChecked()) {
208 mTimeButton->setEnabled(true); 208 mTimeButton->setEnabled(true);
209 } 209 }
210 else { 210 else {
211 mTimeButton->setEnabled(false); 211 mTimeButton->setEnabled(false);
212 } 212 }
213 213
214 enableTimeEdits( !allDay ); 214 enableTimeEdits( !allDay );
215 if ( due.isValid() ) { 215 if ( due.isValid() ) {
216 mDueCheck->setChecked(true); 216 mDueCheck->setChecked(true);
217 enableDueEdit(true); 217 enableDueEdit(true);
218 } else { 218 } else {
219 mDueCheck->setChecked(false); 219 mDueCheck->setChecked(false);
220 enableDueEdit(false); 220 enableDueEdit(false);
221 due = QDateTime::currentDateTime().addDays(7); 221 due = QDateTime::currentDateTime().addDays(7);
222 } 222 }
223 223
224 alarmDisable(true); 224 alarmDisable(true);
225 225
226 mStartCheck->setChecked(false); 226 mStartCheck->setChecked(false);
227 enableStartEdit(false); 227 enableStartEdit(false);
228 228
229 mDueDateEdit->setDate(due.date()); 229 mDueDateEdit->setDate(due.date());
230 mDueTimeEdit->setTime(due.time()); 230 mDueTimeEdit->setTime(due.time());
231 due = due.addDays(-7); 231 due = due.addDays(-7);
232 mStartDateEdit->setDate(due.date()); 232 mStartDateEdit->setDate(due.date());
233 mStartTimeEdit->setTime(due.time()); 233 mStartTimeEdit->setTime(due.time());
234 234
235 mPriorityCombo->setCurrentItem(2); 235 mPriorityCombo->setCurrentItem(2);
236 mCompletedLabel->setText(i18n("completed"));; 236 mCompletedLabel->setText(i18n(" completed"));;
237 mCompletedCombo->setCurrentItem(0); 237 mCompletedCombo->setCurrentItem(0);
238 mCompleteDateEdit->hide();
239 mCompleteTimeEdit->hide();
238} 240}
239 241
240void KOEditorGeneralTodo::readTodo(Todo *todo) 242void KOEditorGeneralTodo::readTodo(Todo *todo)
241{ 243{
242 244
243 mSummaryEdit->load(KOLocationBox::SUMMARYTODO); 245 mSummaryEdit->load(KOLocationBox::SUMMARYTODO);
244 mLocationEdit->load(KOLocationBox::LOCATION); 246 mLocationEdit->load(KOLocationBox::LOCATION);
245 KOEditorGeneral::readIncidence(todo); 247 KOEditorGeneral::readIncidence(todo);
246 248
247 QDateTime dueDT; 249 QDateTime dueDT;
248 250
249 if (todo->hasDueDate()) { 251 if (todo->hasDueDate()) {
250 enableAlarmEdit(true); 252 enableAlarmEdit(true);
251 dueDT = todo->dtDue(); 253 dueDT = todo->dtDue();
252 mDueDateEdit->setDate(todo->dtDue().date()); 254 mDueDateEdit->setDate(todo->dtDue().date());
253 mDueTimeEdit->setTime(todo->dtDue().time()); 255 mDueTimeEdit->setTime(todo->dtDue().time());
254 mDueCheck->setChecked(true); 256 mDueCheck->setChecked(true);
255 } else { 257 } else {
256 alarmDisable(true); 258 alarmDisable(true);
257 mDueDateEdit->setEnabled(false); 259 mDueDateEdit->setEnabled(false);
258 mDueTimeEdit->setEnabled(false); 260 mDueTimeEdit->setEnabled(false);
259 mDueDateEdit->setDate(QDate::currentDate()); 261 mDueDateEdit->setDate(QDate::currentDate());
260 mDueTimeEdit->setTime(QTime::currentTime()); 262 mDueTimeEdit->setTime(QTime::currentTime());
261 mDueCheck->setChecked(false); 263 mDueCheck->setChecked(false);
262 } 264 }
263 265
264 if (todo->hasStartDate()) { 266 if (todo->hasStartDate()) {
265 mStartDateEdit->setDate(todo->dtStart().date()); 267 mStartDateEdit->setDate(todo->dtStart().date());
266 mStartTimeEdit->setTime(todo->dtStart().time()); 268 mStartTimeEdit->setTime(todo->dtStart().time());
267 mStartCheck->setChecked(true); 269 mStartCheck->setChecked(true);
268 } else { 270 } else {
269 mStartDateEdit->setEnabled(false); 271 mStartDateEdit->setEnabled(false);
270 mStartTimeEdit->setEnabled(false); 272 mStartTimeEdit->setEnabled(false);
271 mStartDateEdit->setDate(QDate::currentDate()); 273 mStartDateEdit->setDate(QDate::currentDate());
272 mStartTimeEdit->setTime(QTime::currentTime()); 274 mStartTimeEdit->setTime(QTime::currentTime());
273 mStartCheck->setChecked(false); 275 mStartCheck->setChecked(false);
274 } 276 }
275 277
276 mTimeButton->setChecked( !todo->doesFloat() ); 278 mTimeButton->setChecked( !todo->doesFloat() );
277 279
278 mCompletedCombo->setCurrentItem(todo->percentComplete() / 20); 280 mCompletedCombo->setCurrentItem(todo->percentComplete() / 20);
279 if (todo->isCompleted() && todo->hasCompletedDate()) { 281 if (todo->isCompleted() && todo->hasCompletedDate()) {
280 mCompleted = todo->completed(); 282 mCompleted = todo->completed();
281 } 283 }
282 setCompletedDate(); 284 setCompletedDate();
283 285
284 mPriorityCombo->setCurrentItem(todo->priority()-1); 286 mPriorityCombo->setCurrentItem(todo->priority()-1);
285} 287}
@@ -420,76 +422,76 @@ bool KOEditorGeneralTodo::validateInput()
420 if (mStartCheck->isChecked()) { 422 if (mStartCheck->isChecked()) {
421 if (!mStartDateEdit->inputIsValid()) { 423 if (!mStartDateEdit->inputIsValid()) {
422 KMessageBox::sorry(0,i18n("Please specify a valid start date.")); 424 KMessageBox::sorry(0,i18n("Please specify a valid start date."));
423 return false; 425 return false;
424 } 426 }
425 } 427 }
426 428
427 if (mStartCheck->isChecked() && mDueCheck->isChecked()) { 429 if (mStartCheck->isChecked() && mDueCheck->isChecked()) {
428 QDateTime startDate; 430 QDateTime startDate;
429 QDateTime dueDate; 431 QDateTime dueDate;
430 startDate.setDate(mStartDateEdit->date()); 432 startDate.setDate(mStartDateEdit->date());
431 dueDate.setDate(mDueDateEdit->date()); 433 dueDate.setDate(mDueDateEdit->date());
432 if (mTimeButton->isChecked()) { 434 if (mTimeButton->isChecked()) {
433 startDate.setTime(mStartTimeEdit->getTime()); 435 startDate.setTime(mStartTimeEdit->getTime());
434 dueDate.setTime(mDueTimeEdit->getTime()); 436 dueDate.setTime(mDueTimeEdit->getTime());
435 } 437 }
436 if (startDate > dueDate) { 438 if (startDate > dueDate) {
437 KMessageBox::sorry(0, 439 KMessageBox::sorry(0,
438 i18n("The start date cannot be after the due date.")); 440 i18n("The start date cannot be after the due date."));
439 return false; 441 return false;
440 } 442 }
441 } 443 }
442 444
443 return KOEditorGeneral::validateInput(); 445 return KOEditorGeneral::validateInput();
444} 446}
445 447
446void KOEditorGeneralTodo::completedChanged(int index) 448void KOEditorGeneralTodo::completedChanged(int index)
447{ 449{
448 if (index == 5) { 450 if (index == 5) {
449 //get rid of milli sec 451 //get rid of milli sec
450 mCompleted = QDateTime::currentDateTime(); 452 mCompleted = QDateTime::currentDateTime();
451 } 453 }
452 setCompletedDate(); 454 setCompletedDate();
453} 455}
454 456
455void KOEditorGeneralTodo::setCompletedDate() 457void KOEditorGeneralTodo::setCompletedDate()
456{ 458{
457 if (mCompletedCombo->currentItem() == 5 && mCompleted.isValid()) { 459 if (mCompletedCombo->currentItem() == 5 && mCompleted.isValid()) {
458 if ( QApplication::desktop()->width() < 480 ) { 460 if ( QApplication::desktop()->width() < 480 ) {
459 mCompletedLabel->setText(i18n(" on")); 461 mCompletedLabel->setText(i18n(" on"));
460 } 462 }
461 else 463 else
462 mCompletedLabel->setText(i18n(" completed on ")); 464 mCompletedLabel->setText(i18n(" completed on "));
463 mCompleteDateEdit->show(); 465 mCompleteDateEdit->show();
464 mCompleteTimeEdit->show(); 466 mCompleteTimeEdit->show();
465 mCompleteTimeEdit->setTime( mCompleted.time() ); 467 mCompleteTimeEdit->setTime( mCompleted.time() );
466 mCompleteDateEdit->setDate( mCompleted.date() ); 468 mCompleteDateEdit->setDate( mCompleted.date() );
467 } else { 469 } else {
468 mCompletedLabel->setText(i18n("completed")); 470 mCompletedLabel->setText(i18n(" completed"));
469 mCompleteDateEdit->hide(); 471 mCompleteDateEdit->hide();
470 mCompleteTimeEdit->hide(); 472 mCompleteTimeEdit->hide();
471 } 473 }
472} 474}
473 475
474void KOEditorGeneralTodo::modified (Todo* todo, int modification) 476void KOEditorGeneralTodo::modified (Todo* todo, int modification)
475{ 477{
476 switch (modification) { 478 switch (modification) {
477 case KOGlobals::PRIORITY_MODIFIED: 479 case KOGlobals::PRIORITY_MODIFIED:
478 mPriorityCombo->setCurrentItem(todo->priority()-1); 480 mPriorityCombo->setCurrentItem(todo->priority()-1);
479 break; 481 break;
480 case KOGlobals::COMPLETION_MODIFIED: 482 case KOGlobals::COMPLETION_MODIFIED:
481 mCompletedCombo->setCurrentItem(todo->percentComplete() / 20); 483 mCompletedCombo->setCurrentItem(todo->percentComplete() / 20);
482 if (todo->isCompleted() && todo->hasCompletedDate()) { 484 if (todo->isCompleted() && todo->hasCompletedDate()) {
483 mCompleted = todo->completed(); 485 mCompleted = todo->completed();
484 } 486 }
485 setCompletedDate(); 487 setCompletedDate();
486 break; 488 break;
487 case KOGlobals::CATEGORY_MODIFIED: 489 case KOGlobals::CATEGORY_MODIFIED:
488 setCategories (todo->categoriesStr ()); 490 setCategories (todo->categoriesStr ());
489 break; 491 break;
490 case KOGlobals::UNKNOWN_MODIFIED: // fall through 492 case KOGlobals::UNKNOWN_MODIFIED: // fall through
491 default: 493 default:
492 readTodo( todo ); 494 readTodo( todo );
493 break; 495 break;
494 } 496 }
495} 497}