author | zautrix <zautrix> | 2005-07-02 16:54:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-02 16:54:00 (UTC) |
commit | 78866028c185f4227bfb653ee2050d7feb2e2b78 (patch) (side-by-side diff) | |
tree | 899b85d02584992f608da22f48076f590483d2bd | |
parent | 20c9e9cb71ad64aebfa27157bb152ece4e34c00a (diff) | |
download | kdepimpi-78866028c185f4227bfb653ee2050d7feb2e2b78.zip kdepimpi-78866028c185f4227bfb653ee2050d7feb2e2b78.tar.gz kdepimpi-78866028c185f4227bfb653ee2050d7feb2e2b78.tar.bz2 |
fixxxxxxxx
-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 @@ -459,25 +459,25 @@ void CalendarView::init() #if 0 // FIXME mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, "CalendarView::DateNavigator", QDate::currentDate()); #endif // mDateNavigator->blockSignals( true ); //leftFrameLayout->addWidget( mDateNavigator ); mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); 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)) ); connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); mTodoList->setNavigator( mNavigator ); #if 0 if ( QApplication::desktop()->width() < 480 ) { leftFrameLayout->addWidget(mFilterView); @@ -645,24 +645,31 @@ void CalendarView::init() CalendarView::~CalendarView() { // kdDebug() << "~CalendarView()" << endl; //qDebug("CalendarView::~CalendarView() "); delete mDialogManager; delete mViewManager; delete mStorage; delete mDateFrame ; delete mEventViewerDialog; //kdDebug() << "~CalendarView() done" << endl; } +void CalendarView::setCalReadOnly( int id, bool readO ) +{ + if ( readO ) { + emit save(); + } + mCalendar->setReadOnly( id, readO ); +} void CalendarView::setScrollBarStep(int val ) { #ifdef DESKTOP_VERSION mDateScrollBar->setLineStep ( val ); #endif } void CalendarView::scrollBarValue(int val ) { #ifdef DESKTOP_VERSION if ( QApplication::desktop()->width() < 800 ) return; static bool block = false; if ( block ) return; diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 651194b..a5f230a 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -191,24 +191,25 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser /** Emitted, when the number of outgoing messages has changed. */ void numOutgoingChanged(int); /** Send status message, which can e.g. be displayed in the status bar. */ void statusMessage(const QString &); void calendarViewExpanded( bool ); void updateSearchDialog(); void filtersUpdated(); public slots: + void setCalReadOnly( int id, bool readO ); void checkAlarms(); void checkFiles(); void slotprintSelInc(); void showNextAlarms(); void showOpenError(); void watchSavedFile(); void recheckTimerAlarm(); void checkNextTimerAlarm(); void addAlarm(const QDateTime &qdt, const QString ¬i ); void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); void removeAlarm(const QDateTime &qdt, const QString ¬i ); diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 1335d7e..3f08ef8 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -148,41 +148,41 @@ void KOCalEditView::selectStdCal( int id ) } emit setCalendarDefault ( id ); } void KOCalEditView::selectCalAlarm(int id ,bool b ) { KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b; emit alarmEnabled ( id , b ); emit needsUpdate(); } 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(); } else { 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(); } void KOCalEditView::findNewStandard() { bool found = false; KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); while ( kkf ) { if (!kkf->isReadOnly && !kkf->mErrorOnLoad ) { found = true; selectStdCal( kkf->mCalNumber ); break; |