-rw-r--r-- | korganizer/kofilterview.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 9709324..a8a3052 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -171,28 +171,30 @@ void KOCalEditView::selectCalAlarm(int id ,bool b ) { KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b; emit alarmEnabled ( id , b ); emit needsUpdate(); } void KOCalEditView::selectReadOnly(int id ,bool b ) { KOPrefs::instance()->getCalendar( id )->isReadOnly = b; emit calendarReadonly ( id , b ); if ( KOPrefs::instance()->getCalendar( id )->isStandard && b && id > 1 ) { KOPrefs::instance()->getCalendar( id )->isStandard = false; KOPrefs::instance()->getCalendar( 1 )->isStandard = true; + mStdandardB.at(0)->setChecked( true ); + mStdandardB.at(id-1)->setChecked( false ); emit setCalendarDefault ( 1 ); } + mStdandardB.at(id-1)->setEnabled( !b ); emit needsUpdate(); - QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); } void KOCalEditView::setColor( const QColor& c, int id ) { KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; emit needsUpdate(); } void KOCalEditView::deleteCal( int id ) { KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); QString name = kkf->mName; QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); @@ -270,33 +272,24 @@ void KOCalEditView::readConfig() mainLayout->addWidget( lab,0,++ii ); addBut = new QPushButton ( mw ); addBut->setFocusPolicy(NoFocus); mainLayout->addWidget( addBut,0,++ii ); addBut->setPixmap ( SmallIcon("plus")); connect(addBut,SIGNAL(clicked()),SLOT(addCal())); lab = new QLabel ( " ", mw ); mainLayout->addWidget( lab,0,++ii ); -#if 0 - addBut = new QPushButton ( mw ); - mainLayout->addWidget( addBut,0,6 ); - addBut->setPixmap ( SmallIcon("minus")); - connect(addBut,SIGNAL(clicked()),SLOT(deleteAll())); - addBut->setMaximumWidth( addBut->sizeHint().height() ); -#endif - - KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); int row = 1; while ( kkf ) { int iii = 0; KOCalRadioButton* rb = new KOCalRadioButton( mw ); mainLayout->addWidget( rb,row,0 );mStdandardB.append( rb ); rb->setChecked( kkf->isStandard ); rb->setNum( kkf->mCalNumber ); connect (rb, SIGNAL (selectNum(int,bool)), SLOT ( selectStdCal(int,bool) ) ); if ( kkf->mErrorOnLoad || kkf->isReadOnly ) rb->setEnabled( false ); KOCalCheckButton* cb = new KOCalCheckButton( mw ); |