-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 | |||
@@ -159,19 +159,20 @@ 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(); |
@@ -246,11 +247,9 @@ void KOCalEditView::readConfig() | |||
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); |
@@ -259,4 +258,5 @@ void KOCalEditView::readConfig() | |||
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 ); |