summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp10
-rw-r--r--korganizer/koagendaview.h1
-rw-r--r--korganizer/koviewmanager.cpp7
3 files changed, 18 insertions, 0 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 0d36946..13d8398 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1533,6 +1533,16 @@ void KOAgendaView::setStartHour( int h )
1533 mAgenda->setStartHour( h ); 1533 mAgenda->setStartHour( h );
1534 1534
1535} 1535}
1536void KOAgendaView::setInitStartHour()
1537{
1538
1539 if ( KOPrefs::instance()->mCenterOnCurrentTime )
1540 setStartHour( QTime::currentTime ().hour() );
1541 else
1542 setStartHour( KOPrefs::instance()->mDayBegins );
1543
1544}
1545
1536 1546
1537void KOAgendaView::updateTodo( Todo * t, int ) 1547void KOAgendaView::updateTodo( Todo * t, int )
1538{ 1548{
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index 4a058ce..8b8bac0 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -177,6 +177,7 @@ class KOAgendaView : public KOEventView {
177 void deleteSelectedDateTime(); 177 void deleteSelectedDateTime();
178 void repaintAgenda(); 178 void repaintAgenda();
179 public slots: 179 public slots:
180 void setInitStartHour();
180 virtual void updateView(); 181 virtual void updateView();
181 virtual void updateConfig(); 182 virtual void updateConfig();
182 virtual void showDates(const QDate &start, const QDate &end); 183 virtual void showDates(const QDate &start, const QDate &end);
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index b0f26d1..f8f6c1d 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -94,7 +94,14 @@ void KOViewManager::readSettings(KConfig *config)
94 else if (view == "TimeSpan") showTimeSpanView(); 94 else if (view == "TimeSpan") showTimeSpanView();
95 else if (view == "Todo") showTodoView(); 95 else if (view == "Todo") showTodoView();
96 else { 96 else {
97 config->setGroup( "Views" );
98 int dateCount = config->readNumEntry( "ShownDatesCount", 7 );
99 mCurrentAgendaView = dateCount;
97 showAgendaView(); 100 showAgendaView();
101 mCurrentAgendaView = dateCount;
102#ifdef DESKTOP_VERSION
103 QTimer::singleShot( 1000, mAgendaView, SLOT ( setInitStartHour() ) );
104#endif
98 } 105 }
99} 106}
100 107