-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 8 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 6 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 24 | ||||
-rw-r--r-- | korganizer/kotodoviewitem.cpp | 66 | ||||
-rw-r--r-- | libkcal/incidence.cpp | 28 | ||||
-rw-r--r-- | libkcal/incidence.h | 3 | ||||
-rw-r--r-- | libkcal/incidencebase.cpp | 4 | ||||
-rw-r--r-- | libkcal/incidencebase.h | 1 | ||||
-rw-r--r-- | libkdepim/kdatepicker.cpp | 1 |
9 files changed, 117 insertions, 24 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index ea7071d..6723dc5 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1528,2 +1528,10 @@ | |||
1528 | { "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" }, | 1528 | { "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" }, |
1529 | { "Created","Angelegt" }, | ||
1530 | { "Last Modified Sub","Zuletzt geändertes Sub" }, | ||
1531 | { "","" }, | ||
1532 | { "","" }, | ||
1533 | { "","" }, | ||
1534 | { "","" }, | ||
1535 | { "","" }, | ||
1536 | { "","" }, | ||
1529 | { "","" }, | 1537 | { "","" }, |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 7044e90..f9685e9 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -369,3 +369,3 @@ void CalendarView::init() | |||
369 | mNextAlarmDateTime = QDateTime::currentDateTime(); | 369 | mNextAlarmDateTime = QDateTime::currentDateTime(); |
370 | setFocusPolicy ( NoFocus ); | 370 | //setFocusPolicy ( NoFocus ); |
371 | mViewerCallerIsSearchDialog = false; | 371 | mViewerCallerIsSearchDialog = false; |
@@ -4689,4 +4689,4 @@ void CalendarView::keyPressEvent ( QKeyEvent *e) | |||
4689 | { | 4689 | { |
4690 | //qDebug(" alendarView::keyPressEvent "); | 4690 | //qDebug("CalendarView::keyPressEvent "); |
4691 | e->ignore(); | 4691 | e->ignore(); |
4692 | } | 4692 | } |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index add1819..94f35e6 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -434,2 +434,3 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | |||
434 | 434 | ||
435 | e->accept(); | ||
435 | return; | 436 | return; |
@@ -442,2 +443,3 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | |||
442 | QListView::keyPressEvent ( e ); | 443 | QListView::keyPressEvent ( e ); |
444 | e->accept(); | ||
443 | break; | 445 | break; |
@@ -516,3 +518,9 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
516 | quickLayout->addWidget( mQuickAdd ); | 518 | quickLayout->addWidget( mQuickAdd ); |
519 | mNewSubBut = new QPushButton( "sub",mQuickBar ); | ||
520 | QPushButton * s_done = new QPushButton( "D",mQuickBar ); | ||
521 | QPushButton * s_run = new QPushButton( "R",mQuickBar ); | ||
522 | QPushButton * allopen = new QPushButton( "O",mQuickBar ); | ||
523 | QPushButton * allclose = new QPushButton( "C",mQuickBar ); | ||
517 | QPushButton * flat = new QPushButton( "F",mQuickBar ); | 524 | QPushButton * flat = new QPushButton( "F",mQuickBar ); |
525 | |||
518 | int fixwid = flat->sizeHint().height(); | 526 | int fixwid = flat->sizeHint().height(); |
@@ -522,9 +530,6 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
522 | connect ( flat, SIGNAL ( clicked()), SLOT ( setAllFlat())); | 530 | connect ( flat, SIGNAL ( clicked()), SLOT ( setAllFlat())); |
523 | QPushButton * allopen = new QPushButton( "O",mQuickBar ); | ||
524 | allopen->setFixedWidth( fixwid ); | 531 | allopen->setFixedWidth( fixwid ); |
525 | connect ( allopen, SIGNAL ( clicked()), SLOT ( setAllOpen())); | 532 | connect ( allopen, SIGNAL ( clicked()), SLOT ( setAllOpen())); |
526 | QPushButton * allclose = new QPushButton( "C",mQuickBar ); | ||
527 | allclose->setFixedWidth( fixwid ); | 533 | allclose->setFixedWidth( fixwid ); |
528 | connect ( allclose, SIGNAL ( clicked()), SLOT ( setAllClose())); | 534 | connect ( allclose, SIGNAL ( clicked()), SLOT ( setAllClose())); |
529 | QPushButton * s_done = new QPushButton( "D",mQuickBar ); | ||
530 | s_done->setPixmap( SmallIcon("greenhook16")); | 535 | s_done->setPixmap( SmallIcon("greenhook16")); |
@@ -533,3 +538,2 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
533 | connect ( s_done, SIGNAL ( clicked()), SLOT ( toggleCompleted())); | 538 | connect ( s_done, SIGNAL ( clicked()), SLOT ( toggleCompleted())); |
534 | QPushButton * s_run = new QPushButton( "R",mQuickBar ); | ||
535 | s_run->setPixmap( SmallIcon("ko16old")); | 539 | s_run->setPixmap( SmallIcon("ko16old")); |
@@ -539,3 +543,2 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
539 | 543 | ||
540 | mNewSubBut = new QPushButton( "sub",mQuickBar ); | ||
541 | mNewSubBut->setFixedWidth( fixwid*3/2 ); | 544 | mNewSubBut->setFixedWidth( fixwid*3/2 ); |
@@ -577,5 +580,8 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
577 | 580 | ||
578 | mTodoListView->addColumn(i18n("Cancelled")); | 581 | //mTodoListView->addColumn(i18n("Cancelled")); |
579 | mTodoListView->addColumn(i18n("Categories")); | 582 | mTodoListView->addColumn(i18n("Categories")); |
580 | mTodoListView->addColumn(i18n("Calendar")); | 583 | mTodoListView->addColumn(i18n("Calendar")); |
584 | mTodoListView->addColumn(i18n("Last Modified")); | ||
585 | mTodoListView->addColumn(i18n("Created")); | ||
586 | mTodoListView->addColumn(i18n("Last Modified Sub")); | ||
581 | #if 0 | 587 | #if 0 |
@@ -590,3 +596,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
590 | int iii = 0; | 596 | int iii = 0; |
591 | for ( iii = 0; iii< 10 ; ++iii ) | 597 | for ( iii = 0; iii< 12 ; ++iii ) |
592 | mTodoListView->setColumnWidthMode( iii, QListView::Manual ); | 598 | mTodoListView->setColumnWidthMode( iii, QListView::Manual ); |
@@ -1605,3 +1611,2 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e ) | |||
1605 | //return; | 1611 | //return; |
1606 | //qDebug("KOTodoView::keyPressEvent "); | ||
1607 | if ( !isVisible() ) { | 1612 | if ( !isVisible() ) { |
@@ -1613,3 +1618,4 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e ) | |||
1613 | case Qt::Key_Up: | 1618 | case Qt::Key_Up: |
1614 | QWidget::keyPressEvent ( e ); | 1619 | // KOrg::BaseView::keyPressEvent ( e ); |
1620 | e->ignore(); | ||
1615 | break; | 1621 | break; |
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 0cf6e4c..bdef94c 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp | |||
@@ -155,6 +155,22 @@ void KOTodoViewItem::construct() | |||
155 | 155 | ||
156 | setText(7,mTodo->cancelled() ? i18n("Yes") : i18n("No")); | 156 | //setText(7,mTodo->cancelled() ? i18n("Yes") : i18n("No")); |
157 | setText(8,mTodo->categoriesStr()); | 157 | setText(7,mTodo->categoriesStr()); |
158 | setText(9,KOPrefs::instance()->calName( mTodo->calID())); | 158 | setText(8,KOPrefs::instance()->calName( mTodo->calID())); |
159 | 159 | setText(9, KGlobal::locale()->formatDateTime( mTodo->lastModified(), true, true )); | |
160 | setText(10, KGlobal::locale()->formatDateTime( mTodo->created(), true, true )); | ||
161 | setText(11, KGlobal::locale()->formatDateTime( mTodo->lastModifiedSub(), true, true )); | ||
162 | QString key; | ||
163 | QDate d = mTodo->lastModified().date(); | ||
164 | QTime t = mTodo->lastModified().time(); | ||
165 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() ); | ||
166 | setSortKey(9,key); | ||
167 | d = mTodo->created().date(); | ||
168 | t = mTodo->created().time(); | ||
169 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() ); | ||
170 | setSortKey(10,key); | ||
171 | d = mTodo->lastModifiedSub().date(); | ||
172 | t = mTodo->lastModifiedSub().time(); | ||
173 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() ); | ||
174 | setSortKey(11,key); | ||
175 | |||
160 | #if 0 | 176 | #if 0 |
@@ -319,8 +335,40 @@ bool KOTodoViewItem::isAlternate() | |||
319 | { | 335 | { |
320 | 336 | #if 0 | |
337 | //if ( m_known ) return m_odd; | ||
338 | //qDebug("test "); | ||
339 | KOTodoViewItem *item = static_cast<KOTodoViewItem *>(itemAbove()); | ||
340 | if ( item ) { | ||
341 | m_known = item->m_known; | ||
342 | if ( m_known ) { | ||
343 | m_odd = !item->m_odd ; | ||
344 | return m_odd; | ||
345 | } | ||
346 | } else { | ||
347 | item = static_cast<KOTodoViewItem *>(itemBelow()); | ||
348 | if ( item ) { | ||
349 | m_known = item->m_known; | ||
350 | if ( m_known ) { | ||
351 | m_odd = !item->m_odd ; | ||
352 | return m_odd; | ||
353 | } | ||
354 | } | ||
355 | } | ||
321 | KOTodoListView *lv = static_cast<KOTodoListView *>(listView()); | 356 | KOTodoListView *lv = static_cast<KOTodoListView *>(listView()); |
322 | if (lv && lv->alternateBackground().isValid()) | 357 | item = static_cast<KOTodoViewItem *>(lv->firstChild()); |
358 | bool previous = true; | ||
359 | qDebug("WHILE "); | ||
360 | while ( item ) { | ||
361 | item->m_odd = !previous; | ||
362 | item->m_known = true; | ||
363 | previous = !previous; | ||
364 | item = static_cast<KOTodoViewItem *>(item->itemBelow()); | ||
365 | } | ||
366 | return m_odd; | ||
367 | |||
368 | #else | ||
369 | |||
370 | //KOTodoListView *lv = static_cast<KOTodoListView *>(listView()); | ||
371 | //if (lv && lv->alternateBackground().isValid()) | ||
323 | { | 372 | { |
324 | KOTodoViewItem *above = 0; | 373 | KOTodoViewItem *above = static_cast<KOTodoViewItem *>(itemAbove()); |
325 | above = static_cast<KOTodoViewItem *>(itemAbove()); | ||
326 | m_known = above ? above->m_known : true; | 374 | m_known = above ? above->m_known : true; |
@@ -343,2 +391,3 @@ bool KOTodoViewItem::isAlternate() | |||
343 | { | 391 | { |
392 | KOTodoListView *lv = static_cast<KOTodoListView *>(listView()); | ||
344 | item = static_cast<KOTodoViewItem *>(lv->firstChild()); | 393 | item = static_cast<KOTodoViewItem *>(lv->firstChild()); |
@@ -356,2 +405,3 @@ bool KOTodoViewItem::isAlternate() | |||
356 | return false; | 405 | return false; |
406 | #endif | ||
357 | } | 407 | } |
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 11f7ecc..e4bcc5e 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp | |||
@@ -283,3 +283,23 @@ void Incidence::setReadOnly( bool readOnly ) | |||
283 | } | 283 | } |
284 | 284 | void Incidence::setLastModifiedSubInvalid() | |
285 | { | ||
286 | mLastModifiedSub = QDateTime(); | ||
287 | if ( mRelatedTo ) | ||
288 | mRelatedTo->setLastModifiedSubInvalid(); | ||
289 | } | ||
290 | QDateTime Incidence::lastModifiedSub() | ||
291 | { | ||
292 | if ( !mRelations.count() ) | ||
293 | return lastModified(); | ||
294 | if ( mLastModifiedSub.isValid() ) | ||
295 | return mLastModifiedSub; | ||
296 | mLastModifiedSub = lastModified(); | ||
297 | Incidence * inc; | ||
298 | QPtrList<Incidence> Relations = relations(); | ||
299 | for (inc=Relations.first();inc;inc=Relations.next()) { | ||
300 | if ( inc->lastModifiedSub() > mLastModifiedSub ) | ||
301 | mLastModifiedSub = inc->lastModifiedSub(); | ||
302 | } | ||
303 | return mLastModifiedSub; | ||
304 | } | ||
285 | void Incidence::setCreated(QDateTime created) | 305 | void Incidence::setCreated(QDateTime created) |
@@ -470,2 +490,3 @@ void Incidence::addRelation(Incidence *event) | |||
470 | { | 490 | { |
491 | setLastModifiedSubInvalid(); | ||
471 | if( mRelations.findRef( event ) == -1 ) { | 492 | if( mRelations.findRef( event ) == -1 ) { |
@@ -478,5 +499,4 @@ void Incidence::removeRelation(Incidence *event) | |||
478 | { | 499 | { |
479 | 500 | setLastModifiedSubInvalid(); | |
480 | mRelations.removeRef(event); | 501 | mRelations.removeRef(event); |
481 | |||
482 | // if (event->getRelatedTo() == this) event->setRelatedTo(0); | 502 | // if (event->getRelatedTo() == this) event->setRelatedTo(0); |
diff --git a/libkcal/incidence.h b/libkcal/incidence.h index c88ba2f..d4af9f0 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h | |||
@@ -279,2 +279,4 @@ class Incidence : public IncidenceBase | |||
279 | bool isAnniversary() const; | 279 | bool isAnniversary() const; |
280 | QDateTime lastModifiedSub(); | ||
281 | void setLastModifiedSubInvalid(); | ||
280 | 282 | ||
@@ -294,2 +296,3 @@ protected: | |||
294 | QDateTime mCreated; | 296 | QDateTime mCreated; |
297 | QDateTime mLastModifiedSub; | ||
295 | QString mDescription; | 298 | QString mDescription; |
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index 1a19f3e..022dead 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp | |||
@@ -193,3 +193,6 @@ QString IncidenceBase::uid() const | |||
193 | } | 193 | } |
194 | void IncidenceBase::setLastModifiedSubInvalid() | ||
195 | { | ||
194 | 196 | ||
197 | } | ||
195 | void IncidenceBase::setLastModified(const QDateTime &lm) | 198 | void IncidenceBase::setLastModified(const QDateTime &lm) |
@@ -200,2 +203,3 @@ void IncidenceBase::setLastModified(const QDateTime &lm) | |||
200 | mLastModified = getEvenTime(lm); | 203 | mLastModified = getEvenTime(lm); |
204 | setLastModifiedSubInvalid(); | ||
201 | //qDebug("IncidenceBase::setLastModified %s ",lm.toString().latin1()); | 205 | //qDebug("IncidenceBase::setLastModified %s ",lm.toString().latin1()); |
diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h index bed73db..665c1f6 100644 --- a/libkcal/incidencebase.h +++ b/libkcal/incidencebase.h | |||
@@ -151,2 +151,3 @@ class IncidenceBase : public CustomProperties | |||
151 | void setTagged( bool ); | 151 | void setTagged( bool ); |
152 | virtual void setLastModifiedSubInvalid(); | ||
152 | protected: | 153 | protected: |
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp index 5d83511..7f352d6 100644 --- a/libkdepim/kdatepicker.cpp +++ b/libkdepim/kdatepicker.cpp | |||
@@ -478,2 +478,3 @@ void KDatePicker::keyPressEvent ( QKeyEvent * e ) | |||
478 | case Qt::Key_Return: | 478 | case Qt::Key_Return: |
479 | case Qt::Key_Enter: | ||
479 | tableClickedSlot(); | 480 | tableClickedSlot(); |