-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 ) { + + emit calendarReadonly ( id , b ); + KOPrefs::instance()->getCalendar( id )->isReadOnly = b; if ( KOPrefs::instance()->getCalendar( id )->isStandard && b ) { findNewStandard(); - } else { - if ( !b ){ - KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); - while ( kkf ) { - if (kkf->isReadOnly && kkf->isStandard ) { - selectStdCal( id ); - break; - } - kkf = KOPrefs::instance()->mCalendars.next(); + } + if ( !b ){ + KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); + while ( kkf ) { + if (kkf->isReadOnly && kkf->isStandard ) { + selectStdCal( id ); + break; } + kkf = KOPrefs::instance()->mCalendars.next(); } } + mStdandardB.at(id-1)->setEnabled( !b ); - emit calendarReadonly ( id , b ); - KOPrefs::instance()->getCalendar( id )->isReadOnly = b; emit needsUpdate(); @@ -246,11 +247,9 @@ void KOCalEditView::readConfig() mainLayout->setSpacing( 2 ); - QPushButton * addBut = new QPushButton ( mw ); - addBut->setFocusPolicy(NoFocus); - mainLayout->addWidget( addBut,0,0 ); - addBut->setText( "D"); - connect(addBut,SIGNAL(clicked()),SLOT(defaultInfo())); + QPushButton * addButT = new QPushButton ( mw ); + addButT->setFocusPolicy(NoFocus); + mainLayout->addWidget( addButT,0,0 ); + addButT->setText( "D"); + connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo())); //addBut->setPixmap ( SmallIcon("greenhook16")); - addBut->setMaximumWidth( addBut->sizeHint().height() ); - int max = addBut->sizeHint().height(); - addBut = new QPushButton ( mw ); + QPushButton *addBut = new QPushButton ( mw ); addBut->setFocusPolicy(NoFocus); @@ -259,4 +258,5 @@ void KOCalEditView::readConfig() connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); - addBut->setMaximumWidth( addBut->sizeHint().height() ); - + int max = addBut->sizeHint().height(); + addBut->setMaximumWidth( max ); + addButT->setFixedSize( QSize( max, max ) ); QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); |