-rw-r--r-- | korganizer/kofilterview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 1335d7e..3f08ef8 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -136,65 +136,65 @@ void KOCalEditView::selectStdCal( int id ) | |||
136 | { | 136 | { |
137 | KOCalRadioButton* it = mStdandardB.first(); | 137 | KOCalRadioButton* it = mStdandardB.first(); |
138 | while ( it ) { | 138 | while ( it ) { |
139 | it->blockSignals( true ); | 139 | it->blockSignals( true ); |
140 | it->setChecked( it->num() == id ); | 140 | it->setChecked( it->num() == id ); |
141 | it->blockSignals( false ); | 141 | it->blockSignals( false ); |
142 | it = mStdandardB.next(); | 142 | it = mStdandardB.next(); |
143 | } | 143 | } |
144 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 144 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
145 | while ( kkf ) { | 145 | while ( kkf ) { |
146 | kkf->isStandard = (kkf->mCalNumber == id ); | 146 | kkf->isStandard = (kkf->mCalNumber == id ); |
147 | kkf = KOPrefs::instance()->mCalendars.next(); | 147 | kkf = KOPrefs::instance()->mCalendars.next(); |
148 | } | 148 | } |
149 | emit setCalendarDefault ( id ); | 149 | emit setCalendarDefault ( id ); |
150 | } | 150 | } |
151 | 151 | ||
152 | void KOCalEditView::selectCalAlarm(int id ,bool b ) | 152 | void KOCalEditView::selectCalAlarm(int id ,bool b ) |
153 | { | 153 | { |
154 | KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b; | 154 | KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b; |
155 | emit alarmEnabled ( id , b ); | 155 | emit alarmEnabled ( id , b ); |
156 | emit needsUpdate(); | 156 | emit needsUpdate(); |
157 | } | 157 | } |
158 | void KOCalEditView::selectReadOnly(int id ,bool b ) | 158 | void KOCalEditView::selectReadOnly(int id ,bool b ) |
159 | { | 159 | { |
160 | KOPrefs::instance()->getCalendar( id )->isReadOnly = b; | ||
161 | emit calendarReadonly ( id , b ); | ||
162 | if ( KOPrefs::instance()->getCalendar( id )->isStandard && b ) { | 160 | if ( KOPrefs::instance()->getCalendar( id )->isStandard && b ) { |
163 | findNewStandard(); | 161 | findNewStandard(); |
164 | } else { | 162 | } else { |
165 | if ( !b ){ | 163 | if ( !b ){ |
166 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 164 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
167 | while ( kkf ) { | 165 | while ( kkf ) { |
168 | if (kkf->isReadOnly && kkf->isStandard ) { | 166 | if (kkf->isReadOnly && kkf->isStandard ) { |
169 | selectStdCal( id ); | 167 | selectStdCal( id ); |
170 | break; | 168 | break; |
171 | } | 169 | } |
172 | kkf = KOPrefs::instance()->mCalendars.next(); | 170 | kkf = KOPrefs::instance()->mCalendars.next(); |
173 | } | 171 | } |
174 | } | 172 | } |
175 | } | 173 | } |
176 | mStdandardB.at(id-1)->setEnabled( !b ); | 174 | mStdandardB.at(id-1)->setEnabled( !b ); |
175 | emit calendarReadonly ( id , b ); | ||
176 | KOPrefs::instance()->getCalendar( id )->isReadOnly = b; | ||
177 | emit needsUpdate(); | 177 | emit needsUpdate(); |
178 | 178 | ||
179 | } | 179 | } |
180 | void KOCalEditView::findNewStandard() | 180 | void KOCalEditView::findNewStandard() |
181 | { | 181 | { |
182 | bool found = false; | 182 | bool found = false; |
183 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 183 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
184 | while ( kkf ) { | 184 | while ( kkf ) { |
185 | if (!kkf->isReadOnly && !kkf->mErrorOnLoad ) { | 185 | if (!kkf->isReadOnly && !kkf->mErrorOnLoad ) { |
186 | found = true; | 186 | found = true; |
187 | selectStdCal( kkf->mCalNumber ); | 187 | selectStdCal( kkf->mCalNumber ); |
188 | break; | 188 | break; |
189 | } | 189 | } |
190 | kkf = KOPrefs::instance()->mCalendars.next(); | 190 | kkf = KOPrefs::instance()->mCalendars.next(); |
191 | } | 191 | } |
192 | if ( !found ) { | 192 | if ( !found ) { |
193 | KMessageBox::error( this,i18n("\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n"), | 193 | KMessageBox::error( this,i18n("\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n"), |
194 | i18n("Houston, we have a problem!") ); | 194 | i18n("Houston, we have a problem!") ); |
195 | 195 | ||
196 | } | 196 | } |
197 | } | 197 | } |
198 | 198 | ||
199 | void KOCalEditView::setColor( const QColor& c, int id ) | 199 | void KOCalEditView::setColor( const QColor& c, int id ) |
200 | { | 200 | { |