author | zautrix <zautrix> | 2005-06-14 09:10:19 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-14 09:10:19 (UTC) |
commit | bd2fd522c0ba5c5a7897df0941032a9af9842dfc (patch) (side-by-side diff) | |
tree | d76d64810cbcde88f0b56d5924ac4dd52e9abe13 /korganizer/kofilterview.cpp | |
parent | 1dccb9dd9ea32989ecec33c72a3ebd873dce048e (diff) | |
download | kdepimpi-bd2fd522c0ba5c5a7897df0941032a9af9842dfc.zip kdepimpi-bd2fd522c0ba5c5a7897df0941032a9af9842dfc.tar.gz kdepimpi-bd2fd522c0ba5c5a7897df0941032a9af9842dfc.tar.bz2 |
fixxeess
-rw-r--r-- | korganizer/kofilterview.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 9633b2c..3333ac2 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -207,5 +207,11 @@ 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; + emit setCalendarDefault ( 1 ); + } emit needsUpdate(); + QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); } @@ -226,5 +232,5 @@ void KOCalEditView::deleteCal( int id ) KOPrefs::instance()->mCalendars.remove ( kkf ); emit needsUpdate(); - readConfig(); + QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); } void KOCalEditView::infoCal( int id ) @@ -235,6 +241,6 @@ void KOCalEditView::infoCal( int id ) if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { emit calendarAdded( id ); - readConfig(); emit needsUpdate(); + QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); } } @@ -303,5 +309,5 @@ void KOCalEditView::readConfig() cb->setNum( kkf->mCalNumber ); connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectStdCal(int,bool) ) ); - if ( kkf->mErrorOnLoad ) + if ( kkf->mErrorOnLoad || kkf->isReadOnly ) cb->setEnabled( false ); cb = new KOCalCheckButton( mw ); @@ -369,6 +375,6 @@ void KOCalEditView::addCal() kkf->mFileName = file; emit calendarAdded( kkf->mCalNumber ); - readConfig(); emit needsUpdate(); + QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); } void KOCalEditView::enableAll() |