summaryrefslogtreecommitdiff
path: root/core/pim
Side-by-side diff
Diffstat (limited to 'core/pim') (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
@@ -274,23 +274,27 @@ void DateBook::slotSettings()
frmSettings.setRowStyle( rowStyle );
#if defined (Q_WS_QWS) || defined(_WS_QWS_)
frmSettings.showMaximized();
#endif
if ( frmSettings.exec() ) {
+
aPreset = frmSettings.alarmPreset();
presetTime = frmSettings.presetTime();
startTime = frmSettings.startTime();
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();
// make the change obvious
if ( views->visibleWidget() ) {
if ( views->visibleWidget() == dayView )
dayView->redraw();
@@ -545,16 +549,16 @@ void DateBook::initWeek()
views->addWidget( weekView, WEEK );
connect( weekView, SIGNAL( showDate( int, int, int ) ),
this, SLOT( showDay( int, int, int ) ) );
connect( this, SIGNAL( newEvent() ),
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 );
QDate d = QDate( yearNumber, 12, 31 );
calcWeek( d, totWeeks, yearNumber, onMonday );
@@ -562,12 +566,13 @@ void DateBook::initWeek()
d = d.addDays( -1 );
calcWeek( d, totWeeks, yearNumber, onMonday );
}
if ( totWeeks != weekView->totalWeeks() )
weekView->setTotalWeeks( totWeeks );
}
+
void DateBook::initWeekLst() {
if ( !weekLstView ) {
weekLstView = new DateBookWeekLst( ampm, onMonday, db,
views, "weeklst view" );
views->addWidget( weekLstView, WEEKLST );