summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt13
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt9
-rw-r--r--korganizer/calendarview.cpp21
-rw-r--r--korganizer/kotodoview.cpp6
-rw-r--r--libkcal/calendar.cpp10
-rw-r--r--libkcal/calendar.h3
-rw-r--r--libkcal/incidence.cpp14
-rw-r--r--libkcal/incidence.h1
8 files changed, 70 insertions, 7 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index be0d2b2..aa6ab0a 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,4 +1,17 @@
Info about the changes in new versions of KDE-Pim/Pi
+********** VERSION 2.0.27 ************
+
+More bugfixes.
+Added possibility to clone in KO/Pi a todo with all its subtodos.
+Added a timetracker funtionality in KO/Pi for todos in the todo view.
+If a todo is set to started and then to stopped it is saving information about the runtime in
+<yourhome>/kdepim/apps/timetrackerdir.
+To read, display, print this information an external program is needed which will be developed.
+It will display the data in a Gantt timetable view with one row for each todo.
+It will have many possibilities sorting the data after category, parent todos, attendees, ... and for creating/printing status reports/summaries.
+Merging of data from different computers/users will be quite easy because every run is stored in a single file.
+The program will be only available for the desktop (Linux+Windows) and it will be not Open Source.
+
********** VERSION 2.0.26 ************
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 5257bff..9476a89 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1159,5 +1159,5 @@
{ "Todo List","Todo Liste" },
{ "&Title:","&Titel:" },
-{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" },
+{ "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" },
{ "Todo list","Todo Liste" },
{ "&Print...","Drucke..." },
@@ -1178,5 +1178,5 @@
{ "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!" },
+{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" },
{ "Yesterday","Gestern" },
{ "Day after tomorrow","Übermorgen" },
@@ -1344,4 +1344,9 @@
{ "Start todo","Starte Todo" },
{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" },
+{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie\nalle Untertodos auch klonen?" },
+{ "Todo has subtodos","Todo hat Untertodos" },
+{ "","" },
+{ "","" },
+{ "","" },
{ "","" },
{ "","" },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index c530037..bd7376a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2705,9 +2705,30 @@ void CalendarView::cloneIncidence(Incidence * orgInc )
if ( newInc->type() == "Todo" ) {
Todo* t = (Todo*) newInc;
+ bool cloneSub = false;
+ if ( orgInc->relations().count() ) {
+ int result = KMessageBox::warningYesNoCancel(this,
+ i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( newInc->summary().left ( 25 ) ),
+ i18n("Todo has subtodos"),
+ i18n("Yes"),
+ i18n("No"));
+
+ if ( result == KMessageBox::Cancel ) {
+ delete t;
+ return;
+ }
+ if (result == KMessageBox::Yes) cloneSub = true;
+ }
showTodoEditor();
mTodoEditor->editTodo( t );
if ( mTodoEditor->exec() ) {
+ if ( cloneSub ) {
+ orgInc->cloneRelations( t );
+ mCalendar->addIncidenceBranch( t );
+ updateView();
+
+ } else {
mCalendar->addTodo( t );
updateView();
+ }
} else {
delete t;
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 7ee1eef..9b5d4ce 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -1120,5 +1120,5 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
void KOTodoView::toggleRunningItem()
{
- qDebug("KOTodoView::toggleRunning() ");
+ // qDebug("KOTodoView::toggleRunning() ");
if ( ! mActiveItem )
return;
@@ -1126,5 +1126,5 @@ void KOTodoView::toggleRunningItem()
if ( t->isRunning() ) {
int result = KMessageBox::warningContinueCancel(this,
- i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 20 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true);
+ i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true);
if (result != KMessageBox::Continue) return;
t->setRunning( false );
@@ -1132,5 +1132,5 @@ void KOTodoView::toggleRunningItem()
} else {
int result = KMessageBox::warningContinueCancel(this,
- i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 20 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true);
+ i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true);
if (result != KMessageBox::Continue) return;
t->setRunning( true );
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp
index 406cd48..ed39ddb 100644
--- a/libkcal/calendar.cpp
+++ b/libkcal/calendar.cpp
@@ -336,5 +336,13 @@ QPtrList<Event> Calendar::events()
return el;
}
-
+void Calendar::addIncidenceBranch(Incidence *i)
+{
+ addIncidence( i );
+ Incidence * inc;
+ QPtrList<Incidence> Relations = i->relations();
+ for (inc=Relations.first();inc;inc=Relations.next()) {
+ addIncidenceBranch( inc );
+ }
+}
bool Calendar::addIncidence(Incidence *i)
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index 2f2c3aa..ab40970 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -141,4 +141,7 @@ public:
*/
virtual bool addIncidence( Incidence * );
+
+ // Adds an incidence and all relatedto incidences to the cal
+ void addIncidenceBranch( Incidence * );
/**
Return filtered list of all incidences of this calendar.
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index 6bca12c..78fa24f 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -264,5 +264,17 @@ void Incidence::recreate()
setLastModified(QDateTime::currentDateTime());
}
-
+void Incidence::cloneRelations( Incidence * newInc )
+{
+ // newInc is already a clone of this incidence
+ Incidence * inc;
+ Incidence * cloneInc;
+ QPtrList<Incidence> Relations = relations();
+ for (inc=Relations.first();inc;inc=Relations.next()) {
+ cloneInc = inc->clone();
+ cloneInc->recreate();
+ cloneInc->setRelatedTo( newInc );
+ inc->cloneRelations( cloneInc );
+ }
+}
void Incidence::setReadOnly( bool readOnly )
{
diff --git a/libkcal/incidence.h b/libkcal/incidence.h
index f8da342..60070a2 100644
--- a/libkcal/incidence.h
+++ b/libkcal/incidence.h
@@ -113,4 +113,5 @@ class Incidence : public IncidenceBase
virtual Incidence *clone() = 0;
+ virtual void cloneRelations( Incidence * );
virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const = 0;