-rw-r--r-- | korganizer/calendarview.cpp | 9 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 5c88abd..6746de2 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -469,5 +469,5 @@ void CalendarView::init() connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); - connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) ); + connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) ); connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); @@ -655,4 +655,11 @@ CalendarView::~CalendarView() //kdDebug() << "~CalendarView() done" << endl; } +void CalendarView::setCalReadOnly( int id, bool readO ) +{ + if ( readO ) { + emit save(); + } + mCalendar->setReadOnly( id, readO ); +} void CalendarView::setScrollBarStep(int val ) { diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 651194b..a5f230a 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -201,4 +201,5 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser public slots: + void setCalReadOnly( int id, bool readO ); void checkAlarms(); void checkFiles(); diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 1335d7e..3f08ef8 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -158,6 +158,4 @@ void KOCalEditView::selectCalAlarm(int id ,bool b ) void KOCalEditView::selectReadOnly(int id ,bool b ) { - KOPrefs::instance()->getCalendar( id )->isReadOnly = b; - emit calendarReadonly ( id , b ); if ( KOPrefs::instance()->getCalendar( id )->isStandard && b ) { findNewStandard(); @@ -175,4 +173,6 @@ void KOCalEditView::selectReadOnly(int id ,bool b ) } mStdandardB.at(id-1)->setEnabled( !b ); + emit calendarReadonly ( id , b ); + KOPrefs::instance()->getCalendar( id )->isReadOnly = b; emit needsUpdate(); |