-rw-r--r-- | korganizer/calendarview.cpp | 1 | ||||
-rw-r--r-- | korganizer/kotodoviewitem.cpp | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index dd4ea41..1338224 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -463,12 +463,13 @@ void CalendarView::init() | |||
463 | connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); | 463 | connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); |
464 | connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) ); | 464 | connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) ); |
465 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); | 465 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); |
466 | connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); | 466 | connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); |
467 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); | 467 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); |
468 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); | 468 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); |
469 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); | ||
469 | mTodoList->setNavigator( mNavigator ); | 470 | mTodoList->setNavigator( mNavigator ); |
470 | #if 0 | 471 | #if 0 |
471 | if ( QApplication::desktop()->width() < 480 ) { | 472 | if ( QApplication::desktop()->width() < 480 ) { |
472 | leftFrameLayout->addWidget(mFilterView); | 473 | leftFrameLayout->addWidget(mFilterView); |
473 | leftFrameLayout->addWidget(mTodoList, 2 ); | 474 | leftFrameLayout->addWidget(mTodoList, 2 ); |
474 | 475 | ||
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index f987b63..748f3e4 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp | |||
@@ -365,20 +365,23 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i | |||
365 | role = QColorGroup::Base; | 365 | role = QColorGroup::Base; |
366 | //#ifndef KORG_NOLVALTERNATION | 366 | //#ifndef KORG_NOLVALTERNATION |
367 | if (isAlternate()) | 367 | if (isAlternate()) |
368 | _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); | 368 | _cg.setColor(QColorGroup::Base, static_cast< KOTodoListView* >(listView())->alternateBackground()); |
369 | bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors; | 369 | bool setColor = KOPrefs::instance()->mTodoViewUsesCatColors; |
370 | QColor colorToSet; | 370 | QColor colorToSet; |
371 | if ( setColor ) { | 371 | if ( column == 0 && mTodo->calID() > 1 ) { |
372 | setColor = true; | ||
373 | colorToSet = KOPrefs::instance()->defaultColor( mTodo->calID() ); | ||
374 | } else if ( setColor ) { | ||
372 | QStringList categories = mTodo->categories(); | 375 | QStringList categories = mTodo->categories(); |
373 | QString cat = categories.first(); | 376 | QString cat = categories.first(); |
374 | if ( !cat.isEmpty()) { | 377 | if ( !cat.isEmpty()) { |
375 | colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); | 378 | colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); |
376 | } else | 379 | } else |
377 | setColor = false; | 380 | setColor = false; |
378 | } | 381 | } |
379 | bool openMode = !isOpen(); | 382 | bool openMode = !isOpen(); |
380 | // maybe we are in flat-display-mode | 383 | // maybe we are in flat-display-mode |
381 | if ( !firstChild() ) | 384 | if ( !firstChild() ) |
382 | openMode = false; | 385 | openMode = false; |
383 | bool colorRunning = mTodo->isRunning(); | 386 | bool colorRunning = mTodo->isRunning(); |
384 | if ( ! colorRunning && openMode ) | 387 | if ( ! colorRunning && openMode ) |