author | zautrix <zautrix> | 2005-06-13 13:57:22 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-13 13:57:22 (UTC) |
commit | 56de219c5ce910a470a01a0e5003d1a113837ef4 (patch) (unidiff) | |
tree | 3393cb306cec8dcdc05d6ed0fae3ae7d374f2794 /korganizer | |
parent | 4f3ff02932b39bf16b9692c3cb69c101a28b4616 (diff) | |
download | kdepimpi-56de219c5ce910a470a01a0e5003d1a113837ef4.zip kdepimpi-56de219c5ce910a470a01a0e5003d1a113837ef4.tar.gz kdepimpi-56de219c5ce910a470a01a0e5003d1a113837ef4.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/calendarview.cpp | 8 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 4 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 4 | ||||
-rw-r--r-- | korganizer/kofilterview.h | 1 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 4 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 4 | ||||
-rw-r--r-- | korganizer/kotodoviewitem.cpp | 2 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 4 |
9 files changed, 24 insertions, 8 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 07ec459..6e60c56 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -463,6 +463,9 @@ 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)) ); | ||
467 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); | ||
468 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); | ||
466 | mTodoList->setNavigator( mNavigator ); | 469 | mTodoList->setNavigator( mNavigator ); |
467 | #if 0 | 470 | #if 0 |
468 | if ( QApplication::desktop()->width() < 480 ) { | 471 | if ( QApplication::desktop()->width() < 480 ) { |
@@ -1869,6 +1872,11 @@ bool CalendarView::restoreCalendarSettings() | |||
1869 | cal = calendars.next(); | 1872 | cal = calendars.next(); |
1870 | } | 1873 | } |
1871 | } | 1874 | } |
1875 | void CalendarView::addCalendarId( int id ) | ||
1876 | { | ||
1877 | KopiCalendarFile * cal = KOPrefs::instance()->getCalendar( id ); | ||
1878 | addCalendar( cal ); | ||
1879 | } | ||
1872 | bool CalendarView::addCalendar( KopiCalendarFile * cal ) | 1880 | bool CalendarView::addCalendar( KopiCalendarFile * cal ) |
1873 | { | 1881 | { |
1874 | 1882 | ||
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 0144ba4..ec5b7ab 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -227,6 +227,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
227 | bool saveCalendars(); | 227 | bool saveCalendars(); |
228 | bool restoreCalendarSettings(); | 228 | bool restoreCalendarSettings(); |
229 | bool addCalendar( KopiCalendarFile * ); | 229 | bool addCalendar( KopiCalendarFile * ); |
230 | void addCalendarId( int id ); | ||
230 | bool syncCalendar(QString filename,int mode = 0 ); | 231 | bool syncCalendar(QString filename,int mode = 0 ); |
231 | 232 | ||
232 | /** | 233 | /** |
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 5a3c4d2..c7bc6eb 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -121,7 +121,7 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd ) | |||
121 | if ( (incidence->typeID() == todoID ) &&((static_cast<Todo*>(incidence))->isCompleted()) ) | 121 | if ( (incidence->typeID() == todoID ) &&((static_cast<Todo*>(incidence))->isCompleted()) ) |
122 | mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; | 122 | mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; |
123 | else | 123 | else |
124 | mBackgroundColor =KOPrefs::instance()->mEventColor; | 124 | mBackgroundColor =KOPrefs::instance()->defaultColor( incidence->calID() ); |
125 | } else { | 125 | } else { |
126 | mBackgroundColor = *KOPrefs::instance()->categoryColor(cat); | 126 | mBackgroundColor = *KOPrefs::instance()->categoryColor(cat); |
127 | if ( (incidence->typeID() == todoID ) &&((static_cast<Todo*>(incidence))->isCompleted()) ) { | 127 | if ( (incidence->typeID() == todoID ) &&((static_cast<Todo*>(incidence))->isCompleted()) ) { |
@@ -201,7 +201,7 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) | |||
201 | else | 201 | else |
202 | ++yOff; | 202 | ++yOff; |
203 | } | 203 | } |
204 | if (mIncidence->isAlarmEnabled()) { | 204 | if (mIncidence->isAlarmEnabled() && mIncidence->alarmEnabled()) { |
205 | p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, red ); | 205 | p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, red ); |
206 | if ( horLayout ) | 206 | if ( horLayout ) |
207 | ++xOff; | 207 | ++xOff; |
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 29a4393..2b16347 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -158,6 +158,7 @@ void KOCalEditView::selectCal(int id ,bool b) | |||
158 | { | 158 | { |
159 | KOPrefs::instance()->getCalendar( id )->isEnabled = b; | 159 | KOPrefs::instance()->getCalendar( id )->isEnabled = b; |
160 | emit calendarEnabled ( id, b ); | 160 | emit calendarEnabled ( id, b ); |
161 | emit needsUpdate(); | ||
161 | 162 | ||
162 | } | 163 | } |
163 | void KOCalEditView::selectStdCal( int id, bool b ) | 164 | void KOCalEditView::selectStdCal( int id, bool b ) |
@@ -199,16 +200,19 @@ void KOCalEditView::selectCalAlarm(int id ,bool b ) | |||
199 | { | 200 | { |
200 | KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b; | 201 | KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b; |
201 | emit alarmEnabled ( id , b ); | 202 | emit alarmEnabled ( id , b ); |
203 | emit needsUpdate(); | ||
202 | } | 204 | } |
203 | void KOCalEditView::selectReadOnly(int id ,bool b ) | 205 | void KOCalEditView::selectReadOnly(int id ,bool b ) |
204 | { | 206 | { |
205 | KOPrefs::instance()->getCalendar( id )->isReadOnly = b; | 207 | KOPrefs::instance()->getCalendar( id )->isReadOnly = b; |
206 | emit calendarReadonly ( id , b ); | 208 | emit calendarReadonly ( id , b ); |
209 | emit needsUpdate(); | ||
207 | 210 | ||
208 | } | 211 | } |
209 | void KOCalEditView::setColor( const QColor& c, int id ) | 212 | void KOCalEditView::setColor( const QColor& c, int id ) |
210 | { | 213 | { |
211 | KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; | 214 | KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; |
215 | emit needsUpdate(); | ||
212 | } | 216 | } |
213 | void KOCalEditView::deleteCal( int id ) | 217 | void KOCalEditView::deleteCal( int id ) |
214 | { | 218 | { |
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index aaf0eb6..4a0cd8a 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h | |||
@@ -138,6 +138,7 @@ class KOCalEditView : public QWidget | |||
138 | void setCalendarDefault ( int cal ); | 138 | void setCalendarDefault ( int cal ); |
139 | void removeCalendar ( int cal ); | 139 | void removeCalendar ( int cal ); |
140 | void calendarAdded( int ); | 140 | void calendarAdded( int ); |
141 | void needsUpdate(); | ||
141 | 142 | ||
142 | private: | 143 | private: |
143 | QVBoxLayout* ml; | 144 | QVBoxLayout* ml; |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index c868270..96f2502 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -748,7 +748,7 @@ int MonthViewCell::insertEvent(Event *event) | |||
748 | } | 748 | } |
749 | item->setPalette( pal ); | 749 | item->setPalette( pal ); |
750 | item->setRecur( event->recurrence()->doesRecur() ); | 750 | item->setRecur( event->recurrence()->doesRecur() ); |
751 | item->setAlarm( event->isAlarmEnabled() && multiday < 2 ); | 751 | item->setAlarm( event->isAlarmEnabled() && multiday < 2 && event->alarmEnabled() ); |
752 | item->setMoreInfo( event->description().length() > 0 ); | 752 | item->setMoreInfo( event->description().length() > 0 ); |
753 | #ifdef DESKTOP_VERSION | 753 | #ifdef DESKTOP_VERSION |
754 | Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails, | 754 | Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails, |
@@ -829,7 +829,7 @@ void MonthViewCell::insertTodo(Todo *todo) | |||
829 | } | 829 | } |
830 | item->setPalette( pal ); | 830 | item->setPalette( pal ); |
831 | item->setRecur( todo->recurrence()->doesRecur() ); | 831 | item->setRecur( todo->recurrence()->doesRecur() ); |
832 | item->setAlarm( todo->isAlarmEnabled() ); | 832 | item->setAlarm( todo->isAlarmEnabled() && todo->alarmEnabled() ); |
833 | item->setMoreInfo( todo->description().length() > 0 ); | 833 | item->setMoreInfo( todo->description().length() > 0 ); |
834 | insertItem( item , count()); | 834 | insertItem( item , count()); |
835 | #ifdef DESKTOP_VERSION | 835 | #ifdef DESKTOP_VERSION |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 2602487..35c2a9f 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -704,7 +704,7 @@ void KOTodoView::updateView() | |||
704 | while ( incidence ) { | 704 | while ( incidence ) { |
705 | if ( incidence->typeID() == todoID ) { | 705 | if ( incidence->typeID() == todoID ) { |
706 | //qDebug("related %s ",incidence->summary().latin1() ); | 706 | //qDebug("related %s ",incidence->summary().latin1() ); |
707 | if ( !(todoList.contains ( ((Todo* )incidence ) ) )) { | 707 | if ( !(todoList.contains ( ((Todo* )incidence ) ) ) && incidence->calEnabled() ) { |
708 | //qDebug("related not found "); | 708 | //qDebug("related not found "); |
709 | todoList.remove( ); | 709 | todoList.remove( ); |
710 | todo = todoList.current(); | 710 | todo = todoList.current(); |
@@ -844,6 +844,8 @@ QMap<Todo *,KOTodoViewItem *>::ConstIterator | |||
844 | 844 | ||
845 | pendingSubtodo = 0; | 845 | pendingSubtodo = 0; |
846 | Incidence *incidence = todo->relatedTo(); | 846 | Incidence *incidence = todo->relatedTo(); |
847 | while ( incidence && !incidence->calEnabled() ) | ||
848 | incidence = incidence->relatedTo(); | ||
847 | if (incidence && incidence->typeID() == todoID ) { | 849 | if (incidence && incidence->typeID() == todoID ) { |
848 | Todo *relatedTodo = static_cast<Todo *>(incidence); | 850 | Todo *relatedTodo = static_cast<Todo *>(incidence); |
849 | 851 | ||
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 8cb6b83..f987b63 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp | |||
@@ -195,7 +195,7 @@ void KOTodoViewItem::setMyPixmap() | |||
195 | p.end(); | 195 | p.end(); |
196 | pixSize += size; | 196 | pixSize += size; |
197 | } | 197 | } |
198 | if ( mTodo->isAlarmEnabled() ) { | 198 | if ( mTodo->isAlarmEnabled() && mTodo->alarmEnabled()) { |
199 | pixi.resize(size, pixSize+size); | 199 | pixi.resize(size, pixSize+size); |
200 | pPix.fill( Qt::red ); | 200 | pPix.fill( Qt::red ); |
201 | p.begin( &pixi ); | 201 | p.begin( &pixi ); |
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index e8574a0..221debc 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp | |||
@@ -595,7 +595,7 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a | |||
595 | needClose =true; | 595 | needClose =true; |
596 | 596 | ||
597 | } | 597 | } |
598 | if ( ev->isAlarmEnabled() ) { | 598 | if ( ev->isAlarmEnabled() && ev->alarmEnabled()) { |
599 | if ( !needClose) | 599 | if ( !needClose) |
600 | tempText +="["; | 600 | tempText +="["; |
601 | tempText += "a"; | 601 | tempText += "a"; |
@@ -669,7 +669,7 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) | |||
669 | needClose =true; | 669 | needClose =true; |
670 | 670 | ||
671 | } | 671 | } |
672 | if ( ev->isAlarmEnabled() ) { | 672 | if ( ev->isAlarmEnabled() && ev->alarmEnabled() ) { |
673 | if ( !needClose) | 673 | if ( !needClose) |
674 | mText +="["; | 674 | mText +="["; |
675 | mText += "a"; | 675 | mText += "a"; |