summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kofilterview.cpp13
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
@@ -177,16 +177,18 @@ void KOCalEditView::selectReadOnly(int id ,bool b )
177{ 177{
178 KOPrefs::instance()->getCalendar( id )->isReadOnly = b; 178 KOPrefs::instance()->getCalendar( id )->isReadOnly = b;
179 emit calendarReadonly ( id , b ); 179 emit calendarReadonly ( id , b );
180 if ( KOPrefs::instance()->getCalendar( id )->isStandard && b && id > 1 ) { 180 if ( KOPrefs::instance()->getCalendar( id )->isStandard && b && id > 1 ) {
181 KOPrefs::instance()->getCalendar( id )->isStandard = false; 181 KOPrefs::instance()->getCalendar( id )->isStandard = false;
182 KOPrefs::instance()->getCalendar( 1 )->isStandard = true; 182 KOPrefs::instance()->getCalendar( 1 )->isStandard = true;
183 mStdandardB.at(0)->setChecked( true );
184 mStdandardB.at(id-1)->setChecked( false );
183 emit setCalendarDefault ( 1 ); 185 emit setCalendarDefault ( 1 );
184 } 186 }
187 mStdandardB.at(id-1)->setEnabled( !b );
185 emit needsUpdate(); 188 emit needsUpdate();
186 QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
187 189
188} 190}
189void KOCalEditView::setColor( const QColor& c, int id ) 191void KOCalEditView::setColor( const QColor& c, int id )
190{ 192{
191 KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; 193 KOPrefs::instance()->getCalendar( id )->mDefaultColor = c;
192 emit needsUpdate(); 194 emit needsUpdate();
@@ -276,21 +278,12 @@ void KOCalEditView::readConfig()
276 connect(addBut,SIGNAL(clicked()),SLOT(addCal())); 278 connect(addBut,SIGNAL(clicked()),SLOT(addCal()));
277 279
278 lab = new QLabel ( " ", mw ); 280 lab = new QLabel ( " ", mw );
279 mainLayout->addWidget( lab,0,++ii ); 281 mainLayout->addWidget( lab,0,++ii );
280 282
281 283
282#if 0
283 addBut = new QPushButton ( mw );
284 mainLayout->addWidget( addBut,0,6 );
285 addBut->setPixmap ( SmallIcon("minus"));
286 connect(addBut,SIGNAL(clicked()),SLOT(deleteAll()));
287 addBut->setMaximumWidth( addBut->sizeHint().height() );
288#endif
289
290
291 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); 284 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
292 int row = 1; 285 int row = 1;
293 while ( kkf ) { 286 while ( kkf ) {
294 int iii = 0; 287 int iii = 0;
295 KOCalRadioButton* rb = new KOCalRadioButton( mw ); 288 KOCalRadioButton* rb = new KOCalRadioButton( mw );
296 mainLayout->addWidget( rb,row,0 );mStdandardB.append( rb ); 289 mainLayout->addWidget( rb,row,0 );mStdandardB.append( rb );