summaryrefslogtreecommitdiff
path: root/core/pim/datebook
authorumopapisdn <umopapisdn>2003-04-12 01:19:53 (UTC)
committer umopapisdn <umopapisdn>2003-04-12 01:19:53 (UTC)
commit212aef7fd20182fe926644af2ab10a4b49549440 (patch) (side-by-side diff)
tree9e8fb96b40037b31cb2eed411c7a51f35d819ddc /core/pim/datebook
parent79fcbf52d267aa3eb839de35f15992bf5e18f8eb (diff)
downloadopie-212aef7fd20182fe926644af2ab10a4b49549440.zip
opie-212aef7fd20182fe926644af2ab10a4b49549440.tar.gz
opie-212aef7fd20182fe926644af2ab10a4b49549440.tar.bz2
Bugfix: Datebook shouldn't crash if we modify prefences when dayview isn't initialized. :)
Diffstat (limited to 'core/pim/datebook') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 1bc82a5..829f8f8 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -278,4 +278,5 @@ void DateBook::slotSettings()
if ( frmSettings.exec() ) {
+
aPreset = frmSettings.alarmPreset();
presetTime = frmSettings.presetTime();
@@ -283,10 +284,13 @@ void DateBook::slotSettings()
bJumpToCurTime = frmSettings.jumpToCurTime();
rowStyle = frmSettings.rowStyle();
- if ( dayView )
+
+ if ( dayView ) {
dayView->setStartViewTime( startTime );
dayView->setJumpToCurTime( bJumpToCurTime );
dayView->setRowStyle( rowStyle );
- if ( weekView )
+ }
+ if ( weekView ) {
weekView->setStartViewTime( startTime );
+ }
saveSettings();
@@ -549,8 +553,8 @@ void DateBook::initWeek()
weekView, SLOT( redraw() ) );
}
+
//But also get it right: the year that we display can be different
//from the year of the current date. So, first find the year
//number of the current week.
-
int yearNumber, totWeeks;
calcWeek( currentDate(), totWeeks, yearNumber, onMonday );
@@ -566,4 +570,5 @@ void DateBook::initWeek()
weekView->setTotalWeeks( totWeeks );
}
+
void DateBook::initWeekLst() {
if ( !weekLstView ) {