summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-06-15 10:22:38 (UTC)
committer zautrix <zautrix>2005-06-15 10:22:38 (UTC)
commit13c00953a9d521873b03f861e54e83e33b30bc96 (patch) (unidiff)
tree05bc1f7b6d95b68e0d579e70a487c8a48f250a6f /korganizer
parent37175a31a8fa8772403e9588ff3f8bd7de3979cc (diff)
downloadkdepimpi-13c00953a9d521873b03f861e54e83e33b30bc96.zip
kdepimpi-13c00953a9d521873b03f861e54e83e33b30bc96.tar.gz
kdepimpi-13c00953a9d521873b03f861e54e83e33b30bc96.tar.bz2
fixxx
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp11
-rw-r--r--korganizer/kofilterview.cpp10
-rw-r--r--korganizer/komonthview.cpp12
-rw-r--r--korganizer/koprefs.cpp1
-rw-r--r--korganizer/koprefsdialog.cpp1
5 files changed, 22 insertions, 13 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index e660c32..a8e0678 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -110,51 +110,56 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
110 ( !((static_cast<Todo*>(incidence))->isCompleted()) && 110 ( !((static_cast<Todo*>(incidence))->isCompleted()) &&
111 ((static_cast<Todo*>(incidence))->dtDue().date() <= QDate::currentDate()) ) ) { 111 ((static_cast<Todo*>(incidence))->dtDue().date() <= QDate::currentDate()) ) ) {
112 if ( (static_cast<Todo*>(incidence))->dtDue() < QDateTime::currentDateTime().date()) 112 if ( (static_cast<Todo*>(incidence))->dtDue() < QDateTime::currentDateTime().date())
113 mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ; 113 mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ;
114 else 114 else
115 mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor; 115 mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor;
116 } 116 }
117 else { 117 else {
118 QStringList categories = mIncidence->categories(); 118 QStringList categories = mIncidence->categories();
119 QString cat = categories.first(); 119 QString cat = categories.first();
120 if (cat.isEmpty()) { 120 if (cat.isEmpty()) {
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()->defaultColor( incidence->calID() ); 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()) ) {
128 if ( mBackgroundColor == KOPrefs::instance()->mEventColor ) 128 if ( mBackgroundColor == KOPrefs::instance()->mEventColor )
129 mBackgroundColor = KOPrefs::instance()->mTodoDoneColor; 129 mBackgroundColor = KOPrefs::instance()->mTodoDoneColor;
130 } 130 }
131 } 131 }
132 132
133 } 133 }
134 mColorGroup = QColorGroup( mBackgroundColor.light(), 134
135 mBackgroundColor.dark(),mBackgroundColor.light(), 135 QColor BackgroundColor ( mBackgroundColor );
136 mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ; 136 if ( mIncidence->calID() > 1 ) {
137 BackgroundColor = KOPrefs::instance()->defaultColor( mIncidence->calID() );
138 }
139 mColorGroup = QColorGroup( BackgroundColor.light(),
140 BackgroundColor.dark(),BackgroundColor.light(),
141 BackgroundColor.dark(),BackgroundColor, black, BackgroundColor) ;
137 setBackgroundColor( mBackgroundColor ); 142 setBackgroundColor( mBackgroundColor );
138 mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250); 143 mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250);
139 mConflictItems.clear(); 144 mConflictItems.clear();
140 setCellXY(0,0,1); 145 setCellXY(0,0,1);
141 setCellXWidth(0); 146 setCellXWidth(0);
142 setSubCell(0); 147 setSubCell(0);
143 setSubCells(1); 148 setSubCells(1);
144 setMultiItem(0,0,0); 149 setMultiItem(0,0,0);
145 startMove(); 150 startMove();
146 mSelected = true; 151 mSelected = true;
147 select(false); 152 select(false);
148 QFontMetrics fontinf(KOPrefs::instance()->mAgendaViewFont); 153 QFontMetrics fontinf(KOPrefs::instance()->mAgendaViewFont);
149 mFontPixelSize = fontinf.height();; 154 mFontPixelSize = fontinf.height();;
150 hide(); 155 hide();
151 xPaintCoord = -1; 156 xPaintCoord = -1;
152 yPaintCoord = -1; 157 yPaintCoord = -1;
153} 158}
154 159
155 160
156KOAgendaItem::~KOAgendaItem() 161KOAgendaItem::~KOAgendaItem()
157{ 162{
158#if QT_VERSION >= 0x030000 163#if QT_VERSION >= 0x030000
159 164
160#else 165#else
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index 52bc463..a653c18 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -323,54 +323,54 @@ void KOCalEditView::readConfig()
323 if ( kkf->mErrorOnLoad ) 323 if ( kkf->mErrorOnLoad )
324 cb->setEnabled( false ); 324 cb->setEnabled( false );
325 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) ); 325 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) );
326 KOCalButton* name = new KOCalButton( mw ); 326 KOCalButton* name = new KOCalButton( mw );
327 name->setNum( kkf->mCalNumber ); 327 name->setNum( kkf->mCalNumber );
328 name->setText( kkf->mName ); 328 name->setText( kkf->mName );
329 mainLayout->addWidget( name,row,++iii ); 329 mainLayout->addWidget( name,row,++iii );
330 connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); 330 connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) );
331 lab = new QLabel ( i18n(" "), mw ); 331 lab = new QLabel ( i18n(" "), mw );
332 mainLayout->addWidget( lab,row,++iii ); 332 mainLayout->addWidget( lab,row,++iii );
333 cb = new KOCalCheckButton( mw ); 333 cb = new KOCalCheckButton( mw );
334 mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb ); 334 mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb );
335 cb->setChecked( kkf->isAlarmEnabled ); 335 cb->setChecked( kkf->isAlarmEnabled );
336 cb->setNum( kkf->mCalNumber ); 336 cb->setNum( kkf->mCalNumber );
337 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCalAlarm(int,bool) ) ); 337 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCalAlarm(int,bool) ) );
338 if ( kkf->mErrorOnLoad ) 338 if ( kkf->mErrorOnLoad )
339 cb->setEnabled( false ); 339 cb->setEnabled( false );
340 cb = new KOCalCheckButton( mw ); 340 cb = new KOCalCheckButton( mw );
341 mainLayout->addWidget( cb,row,++iii );mROB.append( cb ); 341 mainLayout->addWidget( cb,row,++iii );mROB.append( cb );
342 cb->setChecked( kkf->isReadOnly ); 342 cb->setChecked( kkf->isReadOnly );
343 cb->setNum( kkf->mCalNumber ); 343 cb->setNum( kkf->mCalNumber );
344 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectReadOnly(int,bool) ) ); 344 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectReadOnly(int,bool) ) );
345 if ( kkf->mErrorOnLoad ) 345 if ( kkf->mErrorOnLoad )
346 cb->setEnabled( false ); 346 cb->setEnabled( false );
347 KColorButton *colb = new KColorButton( mw );
348 mainLayout->addWidget( colb,row,++iii );
349 colb->setID( kkf->mCalNumber );
350 colb->setColor( kkf->mDefaultColor );
351 connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) );
352 if ( row > 1) { 347 if ( row > 1) {
348 KColorButton *colb = new KColorButton( mw );
349 mainLayout->addWidget( colb,row,++iii );
350 colb->setID( kkf->mCalNumber );
351 colb->setColor( kkf->mDefaultColor );
352 connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) );
353 KOCalButton* calb = new KOCalButton( mw ); 353 KOCalButton* calb = new KOCalButton( mw );
354 mainLayout->addWidget( calb,row,++iii ); 354 mainLayout->addWidget( calb,row,++iii );
355 calb->setNum( kkf->mCalNumber ); 355 calb->setNum( kkf->mCalNumber );
356 calb->setPixmap ( SmallIcon("minus")); 356 calb->setPixmap ( SmallIcon("minus"));
357 connect (calb, SIGNAL (selectNum(int)), SLOT ( deleteCal(int) ) ); 357 connect (calb, SIGNAL (selectNum(int)), SLOT ( deleteCal(int) ) );
358 int hei = calb->sizeHint().height(); 358 int hei = calb->sizeHint().height();
359 //calb->setMaximumSize( hei*9/10, hei*9/10 ); 359 //calb->setMaximumSize( hei*9/10, hei*9/10 );
360 } 360 }
361 ++row; 361 ++row;
362 kkf = KOPrefs::instance()->mCalendars.next(); 362 kkf = KOPrefs::instance()->mCalendars.next();
363 } 363 }
364 lab = new QLabel ( "", mw ); 364 lab = new QLabel ( "", mw );
365 mainLayout->addWidget( lab,row,0 ); 365 mainLayout->addWidget( lab,row,0 );
366 mw->show(); 366 mw->show();
367 367
368} 368}
369void KOCalEditView::addCal() 369void KOCalEditView::addCal()
370{ 370{
371 KONewCalPrefs prefs ( this ); 371 KONewCalPrefs prefs ( this );
372 if ( ! prefs.exec() ) 372 if ( ! prefs.exec() )
373 return; 373 return;
374 QString name = prefs.calName(); 374 QString name = prefs.calName();
375 QString file = prefs.calFileName(); 375 QString file = prefs.calFileName();
376 QFileInfo fi ( file ); 376 QFileInfo fi ( file );
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 96f2502..2150654 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -709,56 +709,58 @@ int MonthViewCell::insertEvent(Event *event)
709 if ( useToolTips ) 709 if ( useToolTips )
710 mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); 710 mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary();
711 } 711 }
712 } 712 }
713 if ( useToolTips && ! event->location().isEmpty() ) { 713 if ( useToolTips && ! event->location().isEmpty() ) {
714 mToolTipText += " (" + event->location() +")"; 714 mToolTipText += " (" + event->location() +")";
715 } 715 }
716 MonthViewItem *item ; 716 MonthViewItem *item ;
717 717
718 if ( mAvailItemList.count() ) { 718 if ( mAvailItemList.count() ) {
719 item = mAvailItemList.first(); 719 item = mAvailItemList.first();
720 mAvailItemList.remove( item ); 720 mAvailItemList.remove( item );
721 item->recycle( event, mDate, text ); 721 item->recycle( event, mDate, text );
722 } else { 722 } else {
723 item = new MonthViewItem( event, mDate, text ); 723 item = new MonthViewItem( event, mDate, text );
724 } 724 }
725 725
726 QPalette pal; 726 QPalette pal;
727 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { 727 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) {
728 QStringList categories = event->categories(); 728 QStringList categories = event->categories();
729 QString cat = categories.first(); 729 QString cat = categories.first();
730 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { 730 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) {
731 pal = getPalette(); 731 pal = getPalette();
732 if (cat.isEmpty()) { 732 if (cat.isEmpty()) {
733 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); 733 //pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor);
734 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->defaultColor( event->calID() ));
734 } else { 735 } else {
735 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); 736 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat)));
736 } 737 }
737 738
738 } else { 739 } else {
739 if (cat.isEmpty()) { 740 if (cat.isEmpty()) {
740 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); 741 //pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor);
742 pal = QPalette( KOPrefs::instance()->defaultColor( event->calID() ), KOPrefs::instance()->defaultColor( event->calID() ));
741 } else { 743 } else {
742 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); 744 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat)));
743 } 745 }
744 } 746 }
745 747
746 } else { 748 } else {
747 pal = mStandardPalette ; 749 pal = mStandardPalette ;
748 } 750 }
749 item->setPalette( pal ); 751 item->setPalette( pal );
750 item->setRecur( event->recurrence()->doesRecur() ); 752 item->setRecur( event->recurrence()->doesRecur() );
751 item->setAlarm( event->isAlarmEnabled() && multiday < 2 && event->alarmEnabled() ); 753 item->setAlarm( event->isAlarmEnabled() && multiday < 2 && event->alarmEnabled() );
752 item->setMoreInfo( event->description().length() > 0 ); 754 item->setMoreInfo( event->description().length() > 0 );
753#ifdef DESKTOP_VERSION 755#ifdef DESKTOP_VERSION
754 Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails, 756 Attendee *me = event->attendeeByMails(KOPrefs::instance()->mAdditionalMails,
755 KOPrefs::instance()->email()); 757 KOPrefs::instance()->email());
756 if ( me != 0 ) { 758 if ( me != 0 ) {
757 if ( me->status() == Attendee::NeedsAction && me->RSVP()) 759 if ( me->status() == Attendee::NeedsAction && me->RSVP())
758 item->setReply(true && multiday < 2); 760 item->setReply(true && multiday < 2);
759 else 761 else
760 item->setReply(false); 762 item->setReply(false);
761 } else 763 } else
762 item->setReply(false); 764 item->setReply(false);
763#endif 765#endif
764 item->setMultiDay( multiday ); 766 item->setMultiDay( multiday );
@@ -790,56 +792,58 @@ void MonthViewCell::insertTodo(Todo *todo)
790 if (todo->hasDueDate()) { 792 if (todo->hasDueDate()) {
791 if (!todo->doesFloat()) { 793 if (!todo->doesFloat()) {
792 text += KGlobal::locale()->formatTime(todo->dtDue().time()); 794 text += KGlobal::locale()->formatTime(todo->dtDue().time());
793 text += " "; 795 text += " ";
794 } 796 }
795 } 797 }
796 text += todo->summary(); 798 text += todo->summary();
797 MonthViewItem *item ; 799 MonthViewItem *item ;
798 if ( mAvailItemList.count() ) { 800 if ( mAvailItemList.count() ) {
799 item = mAvailItemList.first(); 801 item = mAvailItemList.first();
800 mAvailItemList.remove( item ); 802 mAvailItemList.remove( item );
801 item->recycle( todo, mDate, text ); 803 item->recycle( todo, mDate, text );
802 } else { 804 } else {
803 item = new MonthViewItem( todo, mDate, text ); 805 item = new MonthViewItem( todo, mDate, text );
804 } 806 }
805 //MonthViewItem *item = new MonthViewItem( todo, mDate, text ); 807 //MonthViewItem *item = new MonthViewItem( todo, mDate, text );
806 //item->setPalette( mStandardPalette ); 808 //item->setPalette( mStandardPalette );
807 QPalette pal; 809 QPalette pal;
808 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { 810 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) {
809 QStringList categories = todo->categories(); 811 QStringList categories = todo->categories();
810 QString cat = categories.first(); 812 QString cat = categories.first();
811 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { 813 if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) {
812 pal = getPalette(); 814 pal = getPalette();
813 if (cat.isEmpty()) { 815 if (cat.isEmpty()) {
814 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); 816 //pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor);
817 pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->defaultColor( todo->calID() ));
815 } else { 818 } else {
816 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); 819 pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat)));
817 } 820 }
818 821
819 } else { 822 } else {
820 if (cat.isEmpty()) { 823 if (cat.isEmpty()) {
821 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); 824 //pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor);
825 pal = QPalette(KOPrefs::instance()->defaultColor( todo->calID() ), KOPrefs::instance()->defaultColor( todo->calID() ));
822 } else { 826 } else {
823 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); 827 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat)));
824 } 828 }
825 } 829 }
826 830
827 } else { 831 } else {
828 pal = mStandardPalette ; 832 pal = mStandardPalette ;
829 } 833 }
830 item->setPalette( pal ); 834 item->setPalette( pal );
831 item->setRecur( todo->recurrence()->doesRecur() ); 835 item->setRecur( todo->recurrence()->doesRecur() );
832 item->setAlarm( todo->isAlarmEnabled() && todo->alarmEnabled() ); 836 item->setAlarm( todo->isAlarmEnabled() && todo->alarmEnabled() );
833 item->setMoreInfo( todo->description().length() > 0 ); 837 item->setMoreInfo( todo->description().length() > 0 );
834 insertItem( item , count()); 838 insertItem( item , count());
835#ifdef DESKTOP_VERSION 839#ifdef DESKTOP_VERSION
836 mToolTip.append( text ); 840 mToolTip.append( text );
837#endif 841#endif
838} 842}
839void MonthViewCell::repaintfinishUpdateCell() 843void MonthViewCell::repaintfinishUpdateCell()
840{ 844{
841 MonthViewItem *mitem = (MonthViewItem*) firstItem (); 845 MonthViewItem *mitem = (MonthViewItem*) firstItem ();
842 while ( mitem ) { 846 while ( mitem ) {
843 mitem->setBlockRepaint( false ); 847 mitem->setBlockRepaint( false );
844 updateItem ( mitem ); 848 updateItem ( mitem );
845 mitem = (MonthViewItem *)mitem->next(); 849 mitem = (MonthViewItem *)mitem->next();
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index e679bd3..65f0342 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -476,48 +476,49 @@ KopiCalendarFile * KOPrefs::getNewCalendar()
476 kkf->mCalNumber = mNextAvailableCalendar; 476 kkf->mCalNumber = mNextAvailableCalendar;
477 mDefCalColors.resize( mNextAvailableCalendar ); 477 mDefCalColors.resize( mNextAvailableCalendar );
478 mDefCalColors[mNextAvailableCalendar-1] = kkf; 478 mDefCalColors[mNextAvailableCalendar-1] = kkf;
479 ++mNextAvailableCalendar; 479 ++mNextAvailableCalendar;
480 kkf->mDefaultColor = mEventColor; 480 kkf->mDefaultColor = mEventColor;
481 kkf->mName = i18n("New Calendar"); 481 kkf->mName = i18n("New Calendar");
482 mCalendars.append( kkf ); 482 mCalendars.append( kkf );
483 return kkf; 483 return kkf;
484} 484}
485void KOPrefs::deleteCalendar( int num ) 485void KOPrefs::deleteCalendar( int num )
486{ 486{
487 KopiCalendarFile * kkf = mCalendars.first(); 487 KopiCalendarFile * kkf = mCalendars.first();
488 while ( kkf ) { 488 while ( kkf ) {
489 if ( kkf->mCalNumber == num ) { 489 if ( kkf->mCalNumber == num ) {
490 qDebug("KOPrefs::deleteCalendar %d ", num ); 490 qDebug("KOPrefs::deleteCalendar %d ", num );
491 mCalendars.remove( kkf ); 491 mCalendars.remove( kkf );
492 delete kkf; 492 delete kkf;
493 return; 493 return;
494 } 494 }
495 kkf = mCalendars.next(); 495 kkf = mCalendars.next();
496 } 496 }
497} 497}
498QColor KOPrefs::defaultColor( int calNum ) const 498QColor KOPrefs::defaultColor( int calNum ) const
499{ 499{
500 if ( calNum == 1 ) return mEventColor;
500 return (mDefCalColors[calNum-1])->mDefaultColor; 501 return (mDefCalColors[calNum-1])->mDefaultColor;
501} 502}
502void KOPrefs::usrWriteConfig() 503void KOPrefs::usrWriteConfig()
503{ 504{
504 config()->setGroup("General"); 505 config()->setGroup("General");
505 config()->writeEntry("Custom Categories",mCustomCategories); 506 config()->writeEntry("Custom Categories",mCustomCategories);
506 507
507 config()->setGroup("Personal Settings"); 508 config()->setGroup("Personal Settings");
508 config()->writeEntry("user_name",mName); 509 config()->writeEntry("user_name",mName);
509 config()->writeEntry("user_email",mEmail); 510 config()->writeEntry("user_email",mEmail);
510 511
511 config()->setGroup("Category Colors"); 512 config()->setGroup("Category Colors");
512 QDictIterator<QColor> it(mCategoryColors); 513 QDictIterator<QColor> it(mCategoryColors);
513 while (it.current()) { 514 while (it.current()) {
514 config()->writeEntry(it.currentKey(),*(it.current())); 515 config()->writeEntry(it.currentKey(),*(it.current()));
515 ++it; 516 ++it;
516 } 517 }
517 KConfig fc (locateLocal("config","kopicalendarrc")); 518 KConfig fc (locateLocal("config","kopicalendarrc"));
518 fc.setGroup("CC"); 519 fc.setGroup("CC");
519 fc.writeEntry("NumberCalendars",mCalendars.count()); 520 fc.writeEntry("NumberCalendars",mCalendars.count());
520 int numCal = 1; 521 int numCal = 1;
521 int writeCal = 0; 522 int writeCal = 0;
522 while ( numCal < mNextAvailableCalendar ) { 523 while ( numCal < mNextAvailableCalendar ) {
523 KopiCalendarFile * kkf = mCalendars.first(); 524 KopiCalendarFile * kkf = mCalendars.first();
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 3ee9a22..35a56ca 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -1444,49 +1444,48 @@ void KOPrefsDialog::usrWriteConfig()
1444 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); 1444 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem();
1445 1445
1446 QDictIterator<QColor> it(mCategoryDict); 1446 QDictIterator<QColor> it(mCategoryDict);
1447 while (it.current()) { 1447 while (it.current()) {
1448 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); 1448 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current());
1449 ++it; 1449 ++it;
1450 } 1450 }
1451 1451
1452 KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); 1452 KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value();
1453 KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); 1453 KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value();
1454 KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); 1454 KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value();
1455 1455
1456 KOPrefs::instance()->mAdditionalMails.clear(); 1456 KOPrefs::instance()->mAdditionalMails.clear();
1457 // QListViewItem *item; 1457 // QListViewItem *item;
1458 // item = mAMails->firstChild(); 1458 // item = mAMails->firstChild();
1459 // while (item) 1459 // while (item)
1460 // { 1460 // {
1461 // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); 1461 // KOPrefs::instance()->mAdditionalMails.append( item->text(0) );
1462 // item = item->nextSibling(); 1462 // item = item->nextSibling();
1463 // } 1463 // }
1464 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); 1464 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value();
1465 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; 1465 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ;
1466 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; 1466 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ;
1467 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; 1467 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
1468
1469} 1468}
1470 1469
1471void KOPrefsDialog::updateCategories() 1470void KOPrefsDialog::updateCategories()
1472{ 1471{
1473 mCategoryCombo->clear(); 1472 mCategoryCombo->clear();
1474 mCategoryDict.clear(); 1473 mCategoryDict.clear();
1475 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); 1474 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
1476 updateCategoryColor(); 1475 updateCategoryColor();
1477} 1476}
1478 1477
1479void KOPrefsDialog::toggleEmailSettings(bool on) 1478void KOPrefsDialog::toggleEmailSettings(bool on)
1480{ 1479{
1481 if (on) { 1480 if (on) {
1482 mEmailEdit->setEnabled(false); 1481 mEmailEdit->setEnabled(false);
1483 mNameEdit->setEnabled(false); 1482 mNameEdit->setEnabled(false);
1484 mEmailLabel->setEnabled(false); 1483 mEmailLabel->setEnabled(false);
1485 mNameLabel->setEnabled(false); 1484 mNameLabel->setEnabled(false);
1486 1485
1487 KEMailSettings settings; 1486 KEMailSettings settings;
1488 mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); 1487 mNameEdit->setText(settings.getSetting(KEMailSettings::RealName));
1489 mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); 1488 mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress));
1490 } else { 1489 } else {
1491 mEmailEdit->setEnabled(true); 1490 mEmailEdit->setEnabled(true);
1492 mNameEdit->setEnabled(true); 1491 mNameEdit->setEnabled(true);