summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-06-13 13:57:22 (UTC)
committer zautrix <zautrix>2005-06-13 13:57:22 (UTC)
commit56de219c5ce910a470a01a0e5003d1a113837ef4 (patch) (unidiff)
tree3393cb306cec8dcdc05d6ed0fae3ae7d374f2794 /korganizer
parent4f3ff02932b39bf16b9692c3cb69c101a28b4616 (diff)
downloadkdepimpi-56de219c5ce910a470a01a0e5003d1a113837ef4.zip
kdepimpi-56de219c5ce910a470a01a0e5003d1a113837ef4.tar.gz
kdepimpi-56de219c5ce910a470a01a0e5003d1a113837ef4.tar.bz2
fixxx
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp8
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/koagendaitem.cpp6
-rw-r--r--korganizer/kofilterview.cpp4
-rw-r--r--korganizer/kofilterview.h1
-rw-r--r--korganizer/komonthview.cpp4
-rw-r--r--korganizer/kotodoview.cpp52
-rw-r--r--korganizer/kotodoviewitem.cpp2
-rw-r--r--korganizer/kowhatsnextview.cpp4
9 files changed, 49 insertions, 33 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 07ec459..6e60c56 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -465,2 +465,5 @@ void CalendarView::init()
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 );
@@ -1871,2 +1874,7 @@ bool CalendarView::restoreCalendarSettings()
1871} 1874}
1875void CalendarView::addCalendarId( int id )
1876{
1877 KopiCalendarFile * cal = KOPrefs::instance()->getCalendar( id );
1878 addCalendar( cal );
1879}
1872bool CalendarView::addCalendar( KopiCalendarFile * cal ) 1880bool CalendarView::addCalendar( KopiCalendarFile * cal )
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 0144ba4..ec5b7ab 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -229,2 +229,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
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 );
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 5a3c4d2..c7bc6eb 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -123,3 +123,3 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
123 else 123 else
124 mBackgroundColor =KOPrefs::instance()->mEventColor; 124 mBackgroundColor =KOPrefs::instance()->defaultColor( incidence->calID() );
125 } else { 125 } else {
@@ -128,3 +128,3 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
128 if ( mBackgroundColor == KOPrefs::instance()->mEventColor ) 128 if ( mBackgroundColor == KOPrefs::instance()->mEventColor )
129 mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; 129 mBackgroundColor = KOPrefs::instance()->mTodoDoneColor;
130 } 130 }
@@ -203,3 +203,3 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
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 );
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index 29a4393..2b16347 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -160,2 +160,3 @@ void KOCalEditView::selectCal(int id ,bool b)
160 emit calendarEnabled ( id, b ); 160 emit calendarEnabled ( id, b );
161 emit needsUpdate();
161 162
@@ -201,2 +202,3 @@ void KOCalEditView::selectCalAlarm(int id ,bool b )
201 emit alarmEnabled ( id , b ); 202 emit alarmEnabled ( id , b );
203 emit needsUpdate();
202} 204}
@@ -206,2 +208,3 @@ void KOCalEditView::selectReadOnly(int id ,bool b )
206 emit calendarReadonly ( id , b ); 208 emit calendarReadonly ( id , b );
209 emit needsUpdate();
207 210
@@ -211,2 +214,3 @@ void KOCalEditView::setColor( const QColor& c, int id )
211 KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; 214 KOPrefs::instance()->getCalendar( id )->mDefaultColor = c;
215 emit needsUpdate();
212} 216}
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index aaf0eb6..4a0cd8a 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -140,2 +140,3 @@ class KOCalEditView : public QWidget
140 void calendarAdded( int ); 140 void calendarAdded( int );
141 void needsUpdate();
141 142
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index c868270..96f2502 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -750,3 +750,3 @@ int MonthViewCell::insertEvent(Event *event)
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 );
@@ -831,3 +831,3 @@ void MonthViewCell::insertTodo(Todo *todo)
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 );
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 2602487..35c2a9f 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -703,6 +703,6 @@ void KOTodoView::updateView()
703 Incidence *incidence = todo->relatedTo(); 703 Incidence *incidence = todo->relatedTo();
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 ");
@@ -838,30 +838,32 @@ void KOTodoView::restoreItemState( QListViewItem *item )
838QMap<Todo *,KOTodoViewItem *>::ConstIterator 838QMap<Todo *,KOTodoViewItem *>::ConstIterator
839 KOTodoView::insertTodoItem(Todo *todo) 839KOTodoView::insertTodoItem(Todo *todo)
840{ 840{
841 841
842// kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; 842 // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl;
843 // TODO: Check, if dynmaic cast is necessary 843 // TODO: Check, if dynmaic cast is necessary
844 844
845 pendingSubtodo = 0; 845 pendingSubtodo = 0;
846 Incidence *incidence = todo->relatedTo(); 846 Incidence *incidence = todo->relatedTo();
847 if (incidence && incidence->typeID() == todoID ) { 847 while ( incidence && !incidence->calEnabled() )
848 Todo *relatedTodo = static_cast<Todo *>(incidence); 848 incidence = incidence->relatedTo();
849 849 if (incidence && incidence->typeID() == todoID ) {
850// kdDebug() << " has Related" << endl; 850 Todo *relatedTodo = static_cast<Todo *>(incidence);
851 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; 851
852 itemIterator = mTodoMap.find(relatedTodo); 852 // kdDebug() << " has Related" << endl;
853 if (itemIterator == mTodoMap.end()) { 853 QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
854// kdDebug() << " related not yet in list" << endl; 854 itemIterator = mTodoMap.find(relatedTodo);
855 itemIterator = insertTodoItem (relatedTodo); 855 if (itemIterator == mTodoMap.end()) {
856 // kdDebug() << " related not yet in list" << endl;
857 itemIterator = insertTodoItem (relatedTodo);
858 }
859 // isn't this pretty stupid? We give one Todo to the KOTodoViewItem
860 // and one into the map. Sure finding is more easy but why? -zecke
861 KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this);
862 return mTodoMap.insert(todo,todoItem);
863 } else {
864 // kdDebug() << " no Related" << endl;
865 // see above -zecke
866 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
867 return mTodoMap.insert(todo,todoItem);
856 } 868 }
857 // isn't this pretty stupid? We give one Todo to the KOTodoViewItem
858 // and one into the map. Sure finding is more easy but why? -zecke
859 KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this);
860 return mTodoMap.insert(todo,todoItem);
861 } else {
862// kdDebug() << " no Related" << endl;
863 // see above -zecke
864 KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
865 return mTodoMap.insert(todo,todoItem);
866 }
867} 869}
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 8cb6b83..f987b63 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -197,3 +197,3 @@ void KOTodoViewItem::setMyPixmap()
197 } 197 }
198 if ( mTodo->isAlarmEnabled() ) { 198 if ( mTodo->isAlarmEnabled() && mTodo->alarmEnabled()) {
199 pixi.resize(size, pixSize+size); 199 pixi.resize(size, pixSize+size);
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index e8574a0..221debc 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -597,3 +597,3 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
597 } 597 }
598 if ( ev->isAlarmEnabled() ) { 598 if ( ev->isAlarmEnabled() && ev->alarmEnabled()) {
599 if ( !needClose) 599 if ( !needClose)
@@ -671,3 +671,3 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
671 } 671 }
672 if ( ev->isAlarmEnabled() ) { 672 if ( ev->isAlarmEnabled() && ev->alarmEnabled() ) {
673 if ( !needClose) 673 if ( !needClose)