-rw-r--r-- | korganizer/koviewmanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 8752636..53cd011 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -167,193 +167,193 @@ void KOViewManager::showDateView( int view, QDate date) mMainView->dateNavigator()->selectDates( date,mMainView->dateNavigator()->selectedDates().count() ); } } void KOViewManager::writeSettings(KConfig *config) { config->setGroup("General"); QString view; if (mCurrentView == mWhatsNextView) view = "WhatsNext"; else if (mCurrentView == mMonthView) view = "Month"; else if (mCurrentView == mListView) view = "List"; else if (mCurrentView == mJournalView) view = "Journal"; else if (mCurrentView == mTimeSpanView) view = "TimeSpan"; else if (mCurrentView == mTodoView) view = "Todo"; else view = "Agenda"; config->writeEntry("Current View",view); if (mAgendaView) { mAgendaView->writeSettings(config); } if (mTimeSpanView) { mTimeSpanView->writeSettings(config); } if (mListView) { mListView->writeSettings(config); } if (mTodoView) { mTodoView->saveLayout(config,"Todo View"); } } void KOViewManager::showNextView() { if (mCurrentView == mWhatsNextView) goto NEXT_X; if (mCurrentView == mAgendaView && mFlagShowNextxDays) goto JOURNAL; if (mCurrentView == mJournalView ) goto DAY_1; if (mCurrentView == mAgendaView && mCurrentAgendaView == 1 ) goto DAY_5; if (mCurrentView == mAgendaView && mCurrentAgendaView == 5 ) goto DAY_7; if (mCurrentView == mAgendaView ) goto DAY_6; if (mCurrentView == mMonthView && KOPrefs::instance()->mMonthViewWeek) goto MONTH; if (mCurrentView == mMonthView ) goto LIST; if (mCurrentView == mListView ) goto TODO; // if (mCurrentView == mTodoView ) goto LIST; NEXT: if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;} NEXT_X: if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;} JOURNAL: if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;} DAY_1: if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;} DAY_5: if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;} DAY_7: if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;} DAY_6: if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;} MONTH: if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;} LIST: if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;} TODO: if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;} if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;} if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;} if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;} if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;} if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;} if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;} if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;} if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;} if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;} - if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;} + //if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;} } void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) { //mFlagShowNextxDays = false; //if(view == mCurrentView) return; if ( view == 0 ) { view = mCurrentView; if ( view == 0 ) return; } bool callupdate = !(view == mCurrentView); bool full = fullScreen; if(view == mCurrentView && view != mWhatsNextView ) { if ( mCurrentAgendaView < 0 ) return; if ( view != mMonthView ) full = mMainView->leftFrame()->isVisible(); } else { if ( view == mMonthView && mMonthView) ;//mMonthView->skipResize = true ; mCurrentView = view; // bool full = fullScreen; bool isFull = !mMainView->leftFrame()->isVisible(); if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) full = true; if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) full = false; } if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); //raiseCurrentView( full ); mMainView->processIncidenceSelection( 0 ); //mMainView->updateView(); raiseCurrentView( full, callupdate ); mMainView->adaptNavigationUnits(); } void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) { mCurrentAgendaView = 0; if ( fullScreen ) { mMainView->leftFrame()->hide(); } else { mMainView->leftFrame()->show(); } //if ( mCurrentView == mMonthView ) qApp->processEvents(); emit signalFullScreen( !fullScreen ); if ( callUpdateView ) mMainView->updateView(); if ( globalFlagBlockAgenda == 5 ) { globalFlagBlockAgenda = 4; globalFlagBlockAgendaItemPaint = 1; } mMainView->viewStack()->raiseWidget(mCurrentView); if ( globalFlagBlockAgenda == 4 ) { if ( mCurrentView == mAgendaView ) { //globalFlagBlockAgenda =1 ; if ( KOPrefs::instance()->mSetTimeToDayStartAt ) mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins ); else if ( KOPrefs::instance()->mCenterOnCurrentTime ) mAgendaView->setStartHour( QTime::currentTime ().hour() ); qApp->processEvents(); //qDebug("qApp->processEvents() "); globalFlagBlockAgenda = 0; mAgendaView->repaintAgenda(); } globalFlagBlockAgenda = 0; } emit signalAgendaView( mCurrentView == mAgendaView ); //qDebug("raiseCurrentView ende "); } void KOViewManager::updateView() { // qDebug("KOViewManager::updateView() "); // if we are updating mTodoView, we get endless recursion if ( mTodoView == mCurrentView ) return; if ( mCurrentView ) mCurrentView->updateView(); } void KOViewManager::updateView(const QDate &start, const QDate &end) { // kdDebug() << "KOViewManager::updateView()" << endl; if (mCurrentView) mCurrentView->showDates(start, end); if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView(); } |