-rw-r--r-- | bin/kdepim/WhatsNew.txt | 13 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 9 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 25 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 6 | ||||
-rw-r--r-- | libkcal/calendar.cpp | 10 | ||||
-rw-r--r-- | libkcal/calendar.h | 5 | ||||
-rw-r--r-- | libkcal/incidence.cpp | 14 | ||||
-rw-r--r-- | libkcal/incidence.h | 1 |
8 files changed, 73 insertions, 10 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,10 +1,23 @@ 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 ************ Added two more fields to the KA/Pi view config: A "Mobile (home)" and a "Mobile (work)" field. Fixed utf8 import (e.g. for Japaneese text) in KA/Pi. Some alarm applet enhancements, e.g. sound stops automatically if value of suspend spinbox changes. And again fixed some more small bugs. 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 @@ -1153,17 +1153,17 @@ { "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" }, +{ "Co&nnect subtodos with its parent","Verbinde Untertodos 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" }, @@ -1172,17 +1172,17 @@ { "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!" }, +{ "\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" }, { "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:" }, @@ -1338,15 +1338,20 @@ { "Start/Stop todo...","Starte/Stoppe Todo..." }, { "Color for running todos:","Farbe für laufende Todos:" }, { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, { "Todo is started","Todo is gestarted" }, { "Stop todo","Stoppe Todo" }, { "Todo is stopped","Todo ist gestoppt" }, { "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 @@ -2699,21 +2699,42 @@ void CalendarView::cancelIncidence(Incidence * inc ) } void CalendarView::cloneIncidence(Incidence * orgInc ) { Incidence * newInc = orgInc->clone(); newInc->recreate(); 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() ) { - mCalendar->addTodo( t ); - updateView(); + if ( cloneSub ) { + orgInc->cloneRelations( t ); + mCalendar->addIncidenceBranch( t ); + updateView(); + + } else { + mCalendar->addTodo( t ); + updateView(); + } } else { delete t; } } else { Event* e = (Event*) newInc; showEventEditor(); mEventEditor->editEvent( e ); diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 7ee1eef..9b5d4ce 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -1114,29 +1114,29 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item) } if ( KOPrefs::instance()->mEditOnDoubleClick ) editItem( item ); else showItem( item , QPoint(), 0 ); } void KOTodoView::toggleRunningItem() { - qDebug("KOTodoView::toggleRunning() "); + // qDebug("KOTodoView::toggleRunning() "); if ( ! mActiveItem ) return; Todo * t = mActiveItem->todo(); 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 ); mActiveItem->construct(); } 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 ); mActiveItem->construct(); } } void KOTodoView::itemClicked(QListViewItem *item) { diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index 406cd48..ed39ddb 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp @@ -330,17 +330,25 @@ QPtrList<Event> Calendar::events( const QDate &start, const QDate &end, } QPtrList<Event> Calendar::events() { QPtrList<Event> el = rawEvents(); mFilter->apply(&el); 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) { Incidence::AddVisitor<Calendar> v(this); return i->accept(v); } void Calendar::deleteIncidence(Incidence *in) diff --git a/libkcal/calendar.h b/libkcal/calendar.h index 2f2c3aa..ab40970 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h @@ -134,17 +134,20 @@ public: */ bool isLocalTime() const; /** Add an incidence to calendar. @return true on success, false on error. */ - virtual bool addIncidence( Incidence * ); + 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. */ virtual QPtrList<Incidence> incidences(); /** Return unfiltered 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 @@ -258,17 +258,29 @@ void Incidence::recreate() setCreated(QDateTime::currentDateTime()); setUid(CalFormat::createUniqueId()); setRevision(0); setIDStr( ":" ); 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 ) { IncidenceBase::setReadOnly( readOnly ); recurrence()->setRecurReadOnly( readOnly); } void Incidence::setCreated(QDateTime created) { diff --git a/libkcal/incidence.h b/libkcal/incidence.h index f8da342..60070a2 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h @@ -107,16 +107,17 @@ class Incidence : public IncidenceBase provide this implementation: <pre> bool accept(Visitor &v) { return v.visit(this); } </pre> */ virtual bool accept(Visitor &) { return false; } virtual Incidence *clone() = 0; + virtual void cloneRelations( Incidence * ); virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const = 0; void setReadOnly( bool ); /** Recreate event. The event is made a new unique event, but already stored event information is preserved. Sets uniquie id, creation date, last modification date and revision number. |