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,26 +1,39 @@
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.
********** VERSION 2.0.25 ************
And again fixed some bugs.
********** VERSION 2.0.24 ************
Fixed again a lot of small bugs.
Some performance optimizations in date navigator.
Month view displays now multi days events on top of each cell, such that it is more likely that all multi days items of one event are in the same row.
********** VERSION 2.0.23 ************
Fixed again a lot of small and strange bugs, e.g. the missing toolbar of KA/Pi after a new installation.
Fixed the (agenda) layout of KO/Pi on 5500er.
Some usebility enhancements (e.g. reselection the current item of the todo view after some changes).
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
@@ -1137,68 +1137,68 @@
{ "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" },
+{ "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" },
{ "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!" },
+{ "\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:" },
{ "compl.todos","erled.Todos" },
{ "Day view","Tagesansicht" },
{ "Next days","Nächste Tage" },
{ "Next week","Nächste Woche" },
{ "Next two weeks","Nächste zwei Wochen" },
{ "This month","Dieser 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!" },
@@ -1322,31 +1322,36 @@
{ "Filter menu icon","Filtermenu Icon" },
{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" },
{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" },
{ "%1d","%1t" },
{ "%1h","%1std" },
{ "%1min","%1min" },
{ "( %1 before )","( %1 vorher )" },
{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
{ "Show Sync Events in WN+Agenda","Zeige Sync-Ereignisse in WN+Agenda" },
{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
{ " on "," am " },
{ "On: ","Am: " },
{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
{ "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
@@ -2683,53 +2683,74 @@ void CalendarView::beamIncidence()
}
void CalendarView::toggleCancelIncidence()
{
Incidence *incidence = currentSelection();
if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
if ( incidence ) {
cancelIncidence(incidence);
}
}
void CalendarView::cancelIncidence(Incidence * inc )
{
inc->setCancelled( ! inc->cancelled() );
changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED );
updateView();
}
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() ) {
+ 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 );
if ( mEventEditor->exec() ) {
mCalendar->addEvent( e );
updateView();
} else {
delete e;
}
}
setActiveWindow();
}
void CalendarView::newEvent()
{
// TODO: Replace this code by a common eventDurationHint of KOBaseView.
KOAgendaView *aView = mViewManager->agendaView();
if (aView) {
if (aView->selectionStart().isValid()) {
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 7ee1eef..9b5d4ce 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -1098,61 +1098,61 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() );
//qDebug("ROW %d ", row);
if (!item) {
newTodo();
return;
} else {
if ( row == 2 ) {
mActiveItem = (KOTodoViewItem *) item;
newSubTodo();
return;
}
if ( row == 1 ) {
mActiveItem = (KOTodoViewItem *) item;
toggleRunningItem();
return;
}
}
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)
{
//qDebug("KOTodoView::itemClicked %d", item);
if (!item) {
if ( pendingSubtodo != 0 ) {
topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
}
pendingSubtodo = 0;
return;
}
KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
if ( pendingSubtodo != 0 ) {
bool allowReparent = true;
QListViewItem *par = item;
while ( par ) {
if ( par == pendingSubtodo ) {
allowReparent = false;
break;
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp
index 406cd48..ed39ddb 100644
--- a/libkcal/calendar.cpp
+++ b/libkcal/calendar.cpp
@@ -314,49 +314,57 @@ QPtrList<Event> Calendar::events( const QDate &date, bool sorted )
return el;
}
QPtrList<Event> Calendar::events( const QDateTime &qdt )
{
QPtrList<Event> el = rawEventsForDate(qdt);
mFilter->apply(&el);
return el;
}
QPtrList<Event> Calendar::events( const QDate &start, const QDate &end,
bool inclusive)
{
QPtrList<Event> el = rawEvents(start,end,inclusive);
mFilter->apply(&el);
return el;
}
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)
{
if ( in->type() == "Event" )
deleteEvent( (Event*) in );
else if ( in->type() =="Todo" )
deleteTodo( (Todo*) in);
else if ( in->type() =="Journal" )
deleteJournal( (Journal*) in );
}
Incidence* Calendar::incidence( const QString& uid )
{
Incidence* i;
if( (i = todo( uid )) != 0 )
return i;
if( (i = event( uid )) != 0 )
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index 2f2c3aa..ab40970 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -119,48 +119,51 @@ public:
/**
Set time zone id (see /usr/share/zoneinfo/zone.tab for list of legal
values).
*/
void setTimeZoneId( const QString & );
/**
Return time zone id.
*/
QString timeZoneId() const;
/**
Use local time, not UTC or a time zone.
*/
void setLocalTime();
/**
Return whether local time is being used.
*/
bool isLocalTime() const;
/**
Add an incidence to calendar.
@return true on success, false on error.
*/
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.
*/
virtual QPtrList<Incidence> rawIncidences();
/**
Adds a Event to this calendar object.
@param anEvent a pointer to the event to add
@return true on success, false on error.
*/
virtual bool addEventNoDup( Event *event ) = 0;
virtual bool addAnniversaryNoDup( Event *event ) = 0;
virtual bool addEvent( Event *anEvent ) = 0;
/**
Delete event from calendar.
*/
virtual void deleteEvent( Event * ) = 0;
/**
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index 6bca12c..78fa24f 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -242,49 +242,61 @@ Incidence* Incidence::recreateCloneException( QDate d )
newInc->setDtStart( QDateTime(d, tim) );
((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) );
} else {
int len = dtStart().secsTo( ((Todo*)this)->dtDue());
QTime tim = ((Todo*)this)->dtDue().time();
((Todo*)newInc)->setDtDue( QDateTime(d, tim) );
((Todo*)newInc)->setDtStart( ((Todo*)newInc)->dtDue().addSecs( -len ) );
((Todo*)this)->setRecurDates();
}
newInc->setExDates( DateList () );
}
return newInc;
}
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)
{
if (mReadOnly) return;
mCreated = getEvenTime(created);
}
QDateTime Incidence::created() const
{
return mCreated;
}
void Incidence::setRevision(int rev)
{
if (mReadOnly) return;
mRevision = rev;
updated();
}
diff --git a/libkcal/incidence.h b/libkcal/incidence.h
index f8da342..60070a2 100644
--- a/libkcal/incidence.h
+++ b/libkcal/incidence.h
@@ -91,48 +91,49 @@ class Incidence : public IncidenceBase
bool visit( Todo *t ) { return mResource->addTodo( t ); }
bool visit( Journal *j ) { return mResource->addJournal( j ); }
private:
T *mResource;
};
/** enumeration for describing an event's secrecy. */
enum { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 };
typedef ListBase<Incidence> List;
Incidence();
Incidence(const Incidence &);
~Incidence();
/**
Accept IncidenceVisitor. A class taking part in the visitor mechanism has to
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.
*/
void recreate();
Incidence* recreateCloneException(QDate);
/** set creation date */
void setCreated(QDateTime);
/** return time and date of creation. */
QDateTime created() const;
/** set the number of revisions this event has seen */
void setRevision(int rev);
/** return the number of revisions this event has seen */
int revision() const;
/** Set starting date/time. */
virtual void setDtStart(const QDateTime &dtStart);