summaryrefslogtreecommitdiffabout
path: root/korganizer/koviewmanager.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koviewmanager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index b0f26d1..f8f6c1d 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -73,49 +73,56 @@ KOViewManager::KOViewManager( CalendarView *mainView ) :
mFlagShowNextxDays = false;
}
KOViewManager::~KOViewManager()
{
}
KOrg::BaseView *KOViewManager::currentView()
{
return mCurrentView;
}
void KOViewManager::readSettings(KConfig *config)
{
config->setGroup("General");
QString view = config->readEntry("Current View");
if (view == "WhatsNext") showWhatsNextView();
else if (view == "Month") showMonthView();
else if (view == "List") showListView();
else if (view == "Journal") showJournalView();
else if (view == "TimeSpan") showTimeSpanView();
else if (view == "Todo") showTodoView();
else {
+ config->setGroup( "Views" );
+ int dateCount = config->readNumEntry( "ShownDatesCount", 7 );
+ mCurrentAgendaView = dateCount;
showAgendaView();
+ mCurrentAgendaView = dateCount;
+#ifdef DESKTOP_VERSION
+ QTimer::singleShot( 1000, mAgendaView, SLOT ( setInitStartHour() ) );
+#endif
}
}
void KOViewManager::showDateView( int view, QDate date)
{
static int lastMode = 0;
static int lastCount = 0;
static bool lastNDMode = false;
static QDate lastDate;
//qDebug("date %d %s", view, date.toString().latin1());
if (view != 9)
lastMode = 0;
//qDebug("%d %d ", lastNDMode, mFlagShowNextxDays );
bool savemFlagShowNextxDays = mFlagShowNextxDays;
mFlagShowNextxDays = false;
if ( view == 3 ) {
//mCurrentAgendaView = 1 ;
lastDate = mMainView->dateNavigator()->selectedDates().first();
lastCount = mMainView->dateNavigator()->selectedDates().count();
lastNDMode = savemFlagShowNextxDays;
mMainView->showDay( date );
lastMode = 1;
} else if (view == 4 ) {