summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-02 16:54:00 (UTC)
committer zautrix <zautrix>2005-07-02 16:54:00 (UTC)
commit78866028c185f4227bfb653ee2050d7feb2e2b78 (patch) (side-by-side diff)
tree899b85d02584992f608da22f48076f590483d2bd
parent20c9e9cb71ad64aebfa27157bb152ece4e34c00a (diff)
downloadkdepimpi-78866028c185f4227bfb653ee2050d7feb2e2b78.zip
kdepimpi-78866028c185f4227bfb653ee2050d7feb2e2b78.tar.gz
kdepimpi-78866028c185f4227bfb653ee2050d7feb2e2b78.tar.bz2
fixxxxxxxx
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp9
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/kofilterview.cpp4
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
@@ -468,7 +468,7 @@ void CalendarView::init()
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)) );
@@ -654,6 +654,13 @@ CalendarView::~CalendarView()
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
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 651194b..a5f230a 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -200,6 +200,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
public slots:
+ void setCalReadOnly( int id, bool readO );
void checkAlarms();
void checkFiles();
void slotprintSelInc();
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index 1335d7e..3f08ef8 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -157,8 +157,6 @@ 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();
} else {
@@ -174,6 +172,8 @@ 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();
}