author | zautrix <zautrix> | 2005-07-02 19:17:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-02 19:17:50 (UTC) |
commit | 8cde05e63c63af0f3ad8048d7160798439125d43 (patch) (unidiff) | |
tree | 4f1cca2213626931c0cf63eaa99bda0e31e4d330 | |
parent | 27c100807f471a63d91ee08bdba3549d3a0cff8c (diff) | |
download | kdepimpi-8cde05e63c63af0f3ad8048d7160798439125d43.zip kdepimpi-8cde05e63c63af0f3ad8048d7160798439125d43.tar.gz kdepimpi-8cde05e63c63af0f3ad8048d7160798439125d43.tar.bz2 |
nochn fixx
-rw-r--r-- | korganizer/kofilterview.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 3f08ef8..ff80afc 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -144,49 +144,50 @@ void KOCalEditView::selectStdCal( int id ) | |||
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 | |||
161 | emit calendarReadonly ( id , b ); | ||
162 | KOPrefs::instance()->getCalendar( id )->isReadOnly = b; | ||
160 | if ( KOPrefs::instance()->getCalendar( id )->isStandard && b ) { | 163 | if ( KOPrefs::instance()->getCalendar( id )->isStandard && b ) { |
161 | findNewStandard(); | 164 | findNewStandard(); |
162 | } else { | 165 | } |
163 | if ( !b ){ | 166 | if ( !b ){ |
164 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 167 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
165 | while ( kkf ) { | 168 | while ( kkf ) { |
166 | if (kkf->isReadOnly && kkf->isStandard ) { | 169 | if (kkf->isReadOnly && kkf->isStandard ) { |
167 | selectStdCal( id ); | 170 | selectStdCal( id ); |
168 | break; | 171 | break; |
169 | } | ||
170 | kkf = KOPrefs::instance()->mCalendars.next(); | ||
171 | } | 172 | } |
173 | kkf = KOPrefs::instance()->mCalendars.next(); | ||
172 | } | 174 | } |
173 | } | 175 | } |
176 | |||
174 | mStdandardB.at(id-1)->setEnabled( !b ); | 177 | mStdandardB.at(id-1)->setEnabled( !b ); |
175 | emit calendarReadonly ( id , b ); | ||
176 | KOPrefs::instance()->getCalendar( id )->isReadOnly = b; | ||
177 | emit needsUpdate(); | 178 | emit needsUpdate(); |
178 | 179 | ||
179 | } | 180 | } |
180 | void KOCalEditView::findNewStandard() | 181 | void KOCalEditView::findNewStandard() |
181 | { | 182 | { |
182 | bool found = false; | 183 | bool found = false; |
183 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 184 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
184 | while ( kkf ) { | 185 | while ( kkf ) { |
185 | if (!kkf->isReadOnly && !kkf->mErrorOnLoad ) { | 186 | if (!kkf->isReadOnly && !kkf->mErrorOnLoad ) { |
186 | found = true; | 187 | found = true; |
187 | selectStdCal( kkf->mCalNumber ); | 188 | selectStdCal( kkf->mCalNumber ); |
188 | break; | 189 | break; |
189 | } | 190 | } |
190 | kkf = KOPrefs::instance()->mCalendars.next(); | 191 | kkf = KOPrefs::instance()->mCalendars.next(); |
191 | } | 192 | } |
192 | if ( !found ) { | 193 | if ( !found ) { |
@@ -231,47 +232,46 @@ void KOCalEditView::infoCal( int id ) | |||
231 | } | 232 | } |
232 | void KOCalEditView::readConfig() | 233 | void KOCalEditView::readConfig() |
233 | { | 234 | { |
234 | 235 | ||
235 | mStdandardB.clear(); | 236 | mStdandardB.clear(); |
236 | mEnabledB.clear(); | 237 | mEnabledB.clear(); |
237 | mAlarmB.clear(); | 238 | mAlarmB.clear(); |
238 | mROB.clear(); | 239 | mROB.clear(); |
239 | 240 | ||
240 | if ( mw ) delete mw; | 241 | if ( mw ) delete mw; |
241 | mw = new QWidget ( viewport() ); | 242 | mw = new QWidget ( viewport() ); |
242 | addChild(mw); | 243 | addChild(mw); |
243 | int ii = 0; | 244 | int ii = 0; |
244 | mainLayout = new QGridLayout ( mw , 2, 8 ); | 245 | mainLayout = new QGridLayout ( mw , 2, 8 ); |
245 | mainLayout->setMargin( 2 ); | 246 | mainLayout->setMargin( 2 ); |
246 | mainLayout->setSpacing( 2 ); | 247 | mainLayout->setSpacing( 2 ); |
247 | QPushButton * addBut = new QPushButton ( mw ); | 248 | QPushButton * addButT = new QPushButton ( mw ); |
248 | addBut->setFocusPolicy(NoFocus); | 249 | addButT->setFocusPolicy(NoFocus); |
249 | mainLayout->addWidget( addBut,0,0 ); | 250 | mainLayout->addWidget( addButT,0,0 ); |
250 | addBut->setText( "D"); | 251 | addButT->setText( "D"); |
251 | connect(addBut,SIGNAL(clicked()),SLOT(defaultInfo())); | 252 | connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo())); |
252 | //addBut->setPixmap ( SmallIcon("greenhook16")); | 253 | //addBut->setPixmap ( SmallIcon("greenhook16")); |
253 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 254 | QPushButton *addBut = new QPushButton ( mw ); |
254 | int max = addBut->sizeHint().height(); | ||
255 | addBut = new QPushButton ( mw ); | ||
256 | addBut->setFocusPolicy(NoFocus); | 255 | addBut->setFocusPolicy(NoFocus); |
257 | mainLayout->addWidget( addBut,0,++ii ); | 256 | mainLayout->addWidget( addBut,0,++ii ); |
258 | addBut->setPixmap ( SmallIcon("eye")); | 257 | addBut->setPixmap ( SmallIcon("eye")); |
259 | connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); | 258 | connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); |
260 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 259 | int max = addBut->sizeHint().height(); |
261 | 260 | addBut->setMaximumWidth( max ); | |
261 | addButT->setFixedSize( QSize( max, max ) ); | ||
262 | QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); | 262 | QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); |
263 | mainLayout->addWidget( lab,0,++ii ); | 263 | mainLayout->addWidget( lab,0,++ii ); |
264 | //lab = new QLabel ( i18n(" "), mw ); | 264 | //lab = new QLabel ( i18n(" "), mw ); |
265 | //mainLayout->addWidget( lab,0,++ii ); | 265 | //mainLayout->addWidget( lab,0,++ii ); |
266 | //lab->setFixedWidth( 1 ); | 266 | //lab->setFixedWidth( 1 ); |
267 | addBut = new QPushButton ( mw ); | 267 | addBut = new QPushButton ( mw ); |
268 | addBut->setFocusPolicy(NoFocus); | 268 | addBut->setFocusPolicy(NoFocus); |
269 | mainLayout->addWidget( addBut,0,++ii ); | 269 | mainLayout->addWidget( addBut,0,++ii ); |
270 | addBut->setPixmap ( SmallIcon("bell")); | 270 | addBut->setPixmap ( SmallIcon("bell")); |
271 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); | 271 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); |
272 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 272 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
273 | 273 | ||
274 | addBut = new QPushButton ( mw ); | 274 | addBut = new QPushButton ( mw ); |
275 | addBut->setFocusPolicy(NoFocus); | 275 | addBut->setFocusPolicy(NoFocus); |
276 | mainLayout->addWidget( addBut,0,++ii ); | 276 | mainLayout->addWidget( addBut,0,++ii ); |
277 | addBut->setPixmap ( SmallIcon("pencil")); | 277 | addBut->setPixmap ( SmallIcon("pencil")); |