summaryrefslogtreecommitdiffabout
Side-by-side diff
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
@@ -1132,103 +1132,104 @@
{ "&End date:","&Enddatum:" },
{ "&Start date:","&Startdatum:" },
{ "Start &time:","Startzeit:" },
{ "End ti&me:","Endzeit:" },
{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" },
{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" },
{ "Alt+D","Alt+D" },
{ "&Use colors","Nutze Farben" },
{ "Alt+U","Alt+U" },
{ "Print week","Drucke Woche" },
{ "CalPrintWeek_Base","CalPrintWeek_Base" },
{ "Use &colors","Nutze Farben" },
{ "Type of View","Typ der Ansicht" },
{ "Print as &Filofax page","Drucke als &Filofax Seite" },
{ "Alt+F","Alt+F" },
{ "Print as &timetable view:","Drucke als Zeittabelle:" },
{ "Alt+T","Alt+T" },
{ "Print as split week view","Drucke als gesplittete Wochenansicht" },
{ "Print month","Drucke Monat" },
{ "CalPrintMonth_Base","CalPrintMonth_Base" },
{ "&Start month:","&Startmonat:" },
{ "&End month:","&Endmonat:" },
{ "Print week &numbers","Drucke Wochen Nummer(n)" },
{ "Print todos","Drucke Todos" },
{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" },
{ "Include &description of the item","Inclusive Itembeschreibung" },
{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" },
{ "Include &priority of the item","Inclusive Priorität des Items" },
{ "Items to Print","Zu druckende Items" },
{ "&From:","Von:" },
{ "&To:","Bis:" },
{ "Print &all todo items","Drucke alle Todo Items" },
{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
{ "Todo List","Todo Liste" },
{ "&Title:","&Titel:" },
{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" },
{ "Todo list","Todo Liste" },
{ "&Print...","Drucke..." },
{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
{ "[Unconfigured]","[Unkonfiguriert]" },
{ "OK","OK" },
{ "FilterEditor","FilterEditor" },
{ "Include","Inclusive" },
{ "Exclude","Exclusive" },
{ "Edit Selection...","Editiere Auswahl" },
{ "recurring events","wiederholende Termine" },
{ "recurr. events","wiederh.Termine" },
{ "completed to-dos","erledigte Todos" },
{ "events","Termine" },
{ "todos","Todos" },
{ "journals","Journale" },
{ "public","öffentl." },
{ "private","privat" },
{ "confidential","vertraul." },
{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" },
{ "Yesterday","Gestern" },
{ "Day after tomorrow","Übermorgen" },
{ "Tomorrow","Morgen" },
{ "Day before yesterday","Vorgestern" },
{ "Size %1","Größe %1" },
{ "New Agendasize: %1","Neue Agendagröße: %1" },
{ " (%1 y.)"," (%1 J.)" },
{ "Allday:","Ganztägig:" },
{ "compl.todos","erled.Todos" },
{ "Day view","Tagesansicht" },
{ "Next days","Nächste Tage" },
{ "Next week","Nächste Woche" },
{ "Next two weeks","Nächste zwei Wochen" },
{ "Next month","Nächster Monat" },
{ "Journal view","Journal" },
{ "Display all opened","Zeige alle geöffnet" },
{ "Display all closed","Zeige alle geschlossen" },
{ "Display all flat","Zeige alle flach" },
{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
{ "Default todo done color:","Standard Todo erledigt Farbe" },
{ "Select week %1-%2","Wähle Woche %1-%2" },
{ "Select Week","Wähle Woche" },
{ "Set alarm for selected...","Setze Alarm für Selekt..." },
{ "Set Alarm!","Setze Alarm!" },
{ "Canged alarm for %1 items","Alarm für %1 Items geändert" },
{ " and "," und " },
{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
{ "Mail to selected","Mail an Ausgewählte" },
{ "Mail to all","Mail an Alle" },
{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
{ " on"," am" },
{ " completed on "," erledigt am " },
{ "Save as Event template","Speichere als Vorlage" },
{ "Load Event template","Lade Termin Vorlage" },
{ "Save as Journal template","Speichere als Journal Vorlage" },
{ "Insert Journal template","Füge Journal Vorlage ein" },
{ "Sub todos:<br>","Unter Todos:<br>" },
{ "Parent todo:<br>","Über Todo:<br>" },
{ "Set current as color category","Setze Gewählte als Farbkategorie" },
+{ " completed"," erledigt" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index da5ef07..6370b54 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -140,194 +140,196 @@ void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout)
// xgettext:no-c-format
mCompletedCombo->insertItem(i18n(" 40 %"));
// xgettext:no-c-format
mCompletedCombo->insertItem(i18n(" 60 %"));
// xgettext:no-c-format
mCompletedCombo->insertItem(i18n(" 80 %"));
// xgettext:no-c-format
mCompletedCombo->insertItem(i18n("100 %"));
connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int)));
topLayout->addWidget(mCompletedCombo);
mCompletedLabel = new QLabel(i18n("completed"),parent);
topLayout->addWidget(mCompletedLabel);
mCompleteDateEdit = new KDateEdit(parent);
topLayout->addWidget(mCompleteDateEdit );
mCompleteTimeEdit = new KOTimeEdit(parent);
topLayout->addWidget( mCompleteTimeEdit);
mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) );
mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) );
if ( QApplication::desktop()->width() <= 480 ) {
if ( QApplication::desktop()->width() < 320 )
mCompleteDateEdit->setMaximumWidth( 85 );
else
mCompleteDateEdit->setMaximumWidth( 140 );
topLayout->setSpacing( 0 );
}
}
void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout)
{
QHBox* h = new QHBox ( parent );
topLayout->addWidget( h );
QLabel *priorityLabel = new QLabel(i18n("Priority:"), h);
// topLayout->addWidget(priorityLabel);
mPriorityCombo = new QComboBox( h );
mPriorityCombo->insertItem(i18n("1 (high)"));
mPriorityCombo->insertItem(i18n("2"));
mPriorityCombo->insertItem(i18n("3"));
mPriorityCombo->insertItem(i18n("4"));
mPriorityCombo->insertItem(i18n("5 (low)"));
//topLayout->addWidget(mPriorityCombo);
}
void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout)
{
QBoxLayout *statusLayout = new QHBoxLayout(topLayout);
initCompletion( parent, statusLayout );
statusLayout->addStretch( 1 );
initPriority( parent, statusLayout );
}
void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay)
{
mSummaryEdit->load(KOLocationBox::SUMMARYTODO);
mLocationEdit->load(KOLocationBox::LOCATION);
KOEditorGeneral::setDefaults(allDay);
mTimeButton->setChecked( !allDay );
if(mTimeButton->isChecked()) {
mTimeButton->setEnabled(true);
}
else {
mTimeButton->setEnabled(false);
}
enableTimeEdits( !allDay );
if ( due.isValid() ) {
mDueCheck->setChecked(true);
enableDueEdit(true);
} else {
mDueCheck->setChecked(false);
enableDueEdit(false);
due = QDateTime::currentDateTime().addDays(7);
}
alarmDisable(true);
mStartCheck->setChecked(false);
enableStartEdit(false);
mDueDateEdit->setDate(due.date());
mDueTimeEdit->setTime(due.time());
due = due.addDays(-7);
mStartDateEdit->setDate(due.date());
mStartTimeEdit->setTime(due.time());
mPriorityCombo->setCurrentItem(2);
- mCompletedLabel->setText(i18n("completed"));;
+ mCompletedLabel->setText(i18n(" completed"));;
mCompletedCombo->setCurrentItem(0);
+ mCompleteDateEdit->hide();
+ mCompleteTimeEdit->hide();
}
void KOEditorGeneralTodo::readTodo(Todo *todo)
{
mSummaryEdit->load(KOLocationBox::SUMMARYTODO);
mLocationEdit->load(KOLocationBox::LOCATION);
KOEditorGeneral::readIncidence(todo);
QDateTime dueDT;
if (todo->hasDueDate()) {
enableAlarmEdit(true);
dueDT = todo->dtDue();
mDueDateEdit->setDate(todo->dtDue().date());
mDueTimeEdit->setTime(todo->dtDue().time());
mDueCheck->setChecked(true);
} else {
alarmDisable(true);
mDueDateEdit->setEnabled(false);
mDueTimeEdit->setEnabled(false);
mDueDateEdit->setDate(QDate::currentDate());
mDueTimeEdit->setTime(QTime::currentTime());
mDueCheck->setChecked(false);
}
if (todo->hasStartDate()) {
mStartDateEdit->setDate(todo->dtStart().date());
mStartTimeEdit->setTime(todo->dtStart().time());
mStartCheck->setChecked(true);
} else {
mStartDateEdit->setEnabled(false);
mStartTimeEdit->setEnabled(false);
mStartDateEdit->setDate(QDate::currentDate());
mStartTimeEdit->setTime(QTime::currentTime());
mStartCheck->setChecked(false);
}
mTimeButton->setChecked( !todo->doesFloat() );
mCompletedCombo->setCurrentItem(todo->percentComplete() / 20);
if (todo->isCompleted() && todo->hasCompletedDate()) {
mCompleted = todo->completed();
}
setCompletedDate();
mPriorityCombo->setCurrentItem(todo->priority()-1);
}
void KOEditorGeneralTodo::writeTodo(Todo *todo)
{
KOEditorGeneral::writeIncidence(todo);
// temp. until something better happens.
QString tmpStr;
todo->setHasDueDate(mDueCheck->isChecked());
todo->setHasStartDate(mStartCheck->isChecked());
QDate tmpDate;
QTime tmpTime;
QDateTime tmpDT;
if ( mTimeButton->isChecked() ) {
todo->setFloats(false);
// set due date/time
tmpDate = mDueDateEdit->date();
tmpTime = mDueTimeEdit->getTime();
tmpDT.setDate(tmpDate);
tmpDT.setTime(tmpTime);
todo->setDtDue(tmpDT);
// set start date/time
tmpDate = mStartDateEdit->date();
tmpTime = mStartTimeEdit->getTime();
tmpDT.setDate(tmpDate);
tmpDT.setTime(tmpTime);
todo->setDtStart(tmpDT);
} else {
todo->setFloats(true);
// need to change this.
tmpDate = mDueDateEdit->date();
tmpTime.setHMS(0,0,0);
tmpDT.setDate(tmpDate);
tmpDT.setTime(tmpTime);
todo->setDtDue(tmpDT);
tmpDate = mStartDateEdit->date();
tmpTime.setHMS(0,0,0);
tmpDT.setDate(tmpDate);
tmpDT.setTime(tmpTime);
todo->setDtStart(tmpDT);
}
todo->setPriority(mPriorityCombo->currentItem()+1);
@@ -372,124 +374,124 @@ void KOEditorGeneralTodo::enableDueEdit(bool enable)
void KOEditorGeneralTodo::enableStartEdit( bool enable )
{
mStartDateEdit->setEnabled( enable );
if(mDueCheck->isChecked() || mStartCheck->isChecked()) {
mTimeButton->setEnabled(true);
}
else {
mTimeButton->setEnabled(false);
mTimeButton->setChecked(false);
}
if (enable) {
mStartTimeEdit->setEnabled( mTimeButton->isChecked() );
} else {
mStartTimeEdit->setEnabled( false );
}
}
void KOEditorGeneralTodo::enableTimeEdits(bool enable)
{
if(mStartCheck->isChecked()) {
mStartTimeEdit->setEnabled( enable );
}
if(mDueCheck->isChecked()) {
mDueTimeEdit->setEnabled( enable );
}
}
void KOEditorGeneralTodo::showAlarm()
{
if ( mDueCheck->isChecked() ) {
alarmDisable(false);
}
else {
alarmDisable(true);
}
}
bool KOEditorGeneralTodo::validateInput()
{
if (mDueCheck->isChecked()) {
if (!mDueDateEdit->inputIsValid()) {
KMessageBox::sorry(0,i18n("Please specify a valid due date."));
return false;
}
}
if (mStartCheck->isChecked()) {
if (!mStartDateEdit->inputIsValid()) {
KMessageBox::sorry(0,i18n("Please specify a valid start date."));
return false;
}
}
if (mStartCheck->isChecked() && mDueCheck->isChecked()) {
QDateTime startDate;
QDateTime dueDate;
startDate.setDate(mStartDateEdit->date());
dueDate.setDate(mDueDateEdit->date());
if (mTimeButton->isChecked()) {
startDate.setTime(mStartTimeEdit->getTime());
dueDate.setTime(mDueTimeEdit->getTime());
}
if (startDate > dueDate) {
KMessageBox::sorry(0,
i18n("The start date cannot be after the due date."));
return false;
}
}
return KOEditorGeneral::validateInput();
}
void KOEditorGeneralTodo::completedChanged(int index)
{
if (index == 5) {
//get rid of milli sec
mCompleted = QDateTime::currentDateTime();
}
setCompletedDate();
}
void KOEditorGeneralTodo::setCompletedDate()
{
if (mCompletedCombo->currentItem() == 5 && mCompleted.isValid()) {
if ( QApplication::desktop()->width() < 480 ) {
mCompletedLabel->setText(i18n(" on"));
}
else
mCompletedLabel->setText(i18n(" completed on "));
mCompleteDateEdit->show();
mCompleteTimeEdit->show();
mCompleteTimeEdit->setTime( mCompleted.time() );
mCompleteDateEdit->setDate( mCompleted.date() );
} else {
- mCompletedLabel->setText(i18n("completed"));
+ mCompletedLabel->setText(i18n(" completed"));
mCompleteDateEdit->hide();
mCompleteTimeEdit->hide();
}
}
void KOEditorGeneralTodo::modified (Todo* todo, int modification)
{
switch (modification) {
case KOGlobals::PRIORITY_MODIFIED:
mPriorityCombo->setCurrentItem(todo->priority()-1);
break;
case KOGlobals::COMPLETION_MODIFIED:
mCompletedCombo->setCurrentItem(todo->percentComplete() / 20);
if (todo->isCompleted() && todo->hasCompletedDate()) {
mCompleted = todo->completed();
}
setCompletedDate();
break;
case KOGlobals::CATEGORY_MODIFIED:
setCategories (todo->categoriesStr ());
break;
case KOGlobals::UNKNOWN_MODIFIED: // fall through
default:
readTodo( todo );
break;
}
}