-rw-r--r-- | korganizer/koviewmanager.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index c442d0b..406e741 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -224,21 +224,13 @@ void KOViewManager::showNextView() | |||
224 | if (mCurrentView == mListView ) goto TODO; | 224 | if (mCurrentView == mListView ) goto TODO; |
225 | // if (mCurrentView == mTodoView ) goto NEXT; | 225 | // if (mCurrentView == mTodoView ) goto NEXT; |
226 | NEXT: | 226 | NEXT: |
227 | if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();goto ENTE ;} | 227 | if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();goto ENTE ;} |
228 | NEXT_X: | 228 | NEXT_X: |
229 | if ( KOPrefs::instance()->mShowIconNextDays ) { | 229 | if ( KOPrefs::instance()->mShowIconNextDays ) { |
230 | globalFlagBlockAgenda = 1; | 230 | showNextXView(); |
231 | if ( mCurrentAgendaView != 3 ) | ||
232 | mCurrentAgendaView = -1; | ||
233 | showAgendaView(KOPrefs::instance()->mFullViewMonth); | ||
234 | globalFlagBlockAgenda = 2; | ||
235 | mMainView->dateNavigator()->selectDates( baseCycleDate , | ||
236 | KOPrefs::instance()->mNextXDays ); | ||
237 | mFlagShowNextxDays = true; | ||
238 | mCurrentAgendaView = 3 ; | ||
239 | goto ENTE ; | 231 | goto ENTE ; |
240 | } | 232 | } |
241 | JOURNAL: | 233 | JOURNAL: |
242 | if ( KOPrefs::instance()->mShowIconJournal ) { | 234 | if ( KOPrefs::instance()->mShowIconJournal ) { |
243 | resetDateSilent( baseCycleDate , 1 ); | 235 | resetDateSilent( baseCycleDate , 1 ); |
244 | showJournalView() ;goto ENTE ;} | 236 | showJournalView() ;goto ENTE ;} |
@@ -404,13 +396,13 @@ void KOViewManager::showWhatsNextView() | |||
404 | connect(this, SIGNAL( printWNV() ), | 396 | connect(this, SIGNAL( printWNV() ), |
405 | mWhatsNextView, SLOT( printMe() ) ); | 397 | mWhatsNextView, SLOT( printMe() ) ); |
406 | } | 398 | } |
407 | globalFlagBlockAgenda = 1; | 399 | globalFlagBlockAgenda = 1; |
408 | showView(mWhatsNextView, true ); | 400 | showView(mWhatsNextView, true ); |
409 | //mWhatsNextView->updateView(); | 401 | //mWhatsNextView->updateView(); |
410 | 402 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW; | |
411 | } | 403 | } |
412 | 404 | ||
413 | void KOViewManager::slotprintWNV() | 405 | void KOViewManager::slotprintWNV() |
414 | { | 406 | { |
415 | if (!mWhatsNextView) | 407 | if (!mWhatsNextView) |
416 | showWhatsNextView(); | 408 | showWhatsNextView(); |
@@ -450,12 +442,13 @@ void KOViewManager::showListView() | |||
450 | mMainView->setBlockShowDates( true ); | 442 | mMainView->setBlockShowDates( true ); |
451 | mMainView->dateNavigator()->selectMonth(); | 443 | mMainView->dateNavigator()->selectMonth(); |
452 | mMainView->setBlockShowDates( false ); | 444 | mMainView->setBlockShowDates( false ); |
453 | } | 445 | } |
454 | showView(mListView, KOPrefs::instance()->mFullViewTodo); | 446 | showView(mListView, KOPrefs::instance()->mFullViewTodo); |
455 | //mFlagShowNextxDays = temp; | 447 | //mFlagShowNextxDays = temp; |
448 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW; | ||
456 | } | 449 | } |
457 | 450 | ||
458 | void KOViewManager::showAgendaView( bool fullScreen ) | 451 | void KOViewManager::showAgendaView( bool fullScreen ) |
459 | { | 452 | { |
460 | 453 | ||
461 | mMainView->dialogManager()->hideSearchDialog(); | 454 | mMainView->dialogManager()->hideSearchDialog(); |
@@ -515,13 +508,13 @@ void KOViewManager::showAgendaView( bool fullScreen ) | |||
515 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); | 508 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); |
516 | mAgendaView->readSettings(); | 509 | mAgendaView->readSettings(); |
517 | mAgendaView->updateConfig(); | 510 | mAgendaView->updateConfig(); |
518 | } | 511 | } |
519 | 512 | ||
520 | showView( mAgendaView, full); | 513 | showView( mAgendaView, full); |
521 | 514 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; | |
522 | } | 515 | } |
523 | 516 | ||
524 | void KOViewManager::showDayView() | 517 | void KOViewManager::showDayView() |
525 | { | 518 | { |
526 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); | 519 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); |
527 | mFlagShowNextxDays = false; | 520 | mFlagShowNextxDays = false; |
@@ -589,12 +582,13 @@ void KOViewManager::showNextXView() | |||
589 | showAgendaView(KOPrefs::instance()->mFullViewMonth); | 582 | showAgendaView(KOPrefs::instance()->mFullViewMonth); |
590 | globalFlagBlockAgenda = 2; | 583 | globalFlagBlockAgenda = 2; |
591 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), | 584 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), |
592 | KOPrefs::instance()->mNextXDays ); | 585 | KOPrefs::instance()->mNextXDays ); |
593 | mFlagShowNextxDays = true; | 586 | mFlagShowNextxDays = true; |
594 | mCurrentAgendaView = 3 ; | 587 | mCurrentAgendaView = 3 ; |
588 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; | ||
595 | } | 589 | } |
596 | bool KOViewManager::showsNextDays() | 590 | bool KOViewManager::showsNextDays() |
597 | { | 591 | { |
598 | return mFlagShowNextxDays; | 592 | return mFlagShowNextxDays; |
599 | } | 593 | } |
600 | void KOViewManager::createMonthView() | 594 | void KOViewManager::createMonthView() |
@@ -673,12 +667,13 @@ void KOViewManager::showMonthViewWeek() | |||
673 | else | 667 | else |
674 | full = true; | 668 | full = true; |
675 | } | 669 | } |
676 | mMainView->dateNavigator()->selectWeek(); | 670 | mMainView->dateNavigator()->selectWeek(); |
677 | showView(mMonthView, full ); | 671 | showView(mMonthView, full ); |
678 | mMonthView->setKeyBFocus(); | 672 | mMonthView->setKeyBFocus(); |
673 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ; | ||
679 | } | 674 | } |
680 | 675 | ||
681 | void KOViewManager::showMonth( const QDate & date ) | 676 | void KOViewManager::showMonth( const QDate & date ) |
682 | { | 677 | { |
683 | mMainView->dateNavigator()->blockSignals( true ); | 678 | mMainView->dateNavigator()->blockSignals( true ); |
684 | mMainView->dateNavigator()->selectDate( date ); | 679 | mMainView->dateNavigator()->selectDate( date ); |
@@ -703,12 +698,13 @@ void KOViewManager::showMonthView() | |||
703 | full = true; | 698 | full = true; |
704 | } | 699 | } |
705 | mMainView->dateNavigator()->selectMonth(); | 700 | mMainView->dateNavigator()->selectMonth(); |
706 | 701 | ||
707 | showView(mMonthView, full ); | 702 | showView(mMonthView, full ); |
708 | mMonthView->setKeyBFocus(); | 703 | mMonthView->setKeyBFocus(); |
704 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ; | ||
709 | 705 | ||
710 | } | 706 | } |
711 | 707 | ||
712 | void KOViewManager::showTodoView() | 708 | void KOViewManager::showTodoView() |
713 | { | 709 | { |
714 | //mFlagShowNextxDays = false; | 710 | //mFlagShowNextxDays = false; |
@@ -758,12 +754,13 @@ void KOViewManager::showTodoView() | |||
758 | mTodoView->restoreLayout(config,"Todo View"); | 754 | mTodoView->restoreLayout(config,"Todo View"); |
759 | mTodoView->setNavigator( mMainView->dateNavigator() ); | 755 | mTodoView->setNavigator( mMainView->dateNavigator() ); |
760 | } | 756 | } |
761 | 757 | ||
762 | globalFlagBlockAgenda = 1; | 758 | globalFlagBlockAgenda = 1; |
763 | showView( mTodoView, true ); | 759 | showView( mTodoView, true ); |
760 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ; | ||
764 | 761 | ||
765 | } | 762 | } |
766 | 763 | ||
767 | void KOViewManager::showJournalView() | 764 | void KOViewManager::showJournalView() |
768 | { | 765 | { |
769 | //mFlagShowNextxDays = false; | 766 | //mFlagShowNextxDays = false; |
@@ -775,12 +772,13 @@ void KOViewManager::showJournalView() | |||
775 | connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) ); | 772 | connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) ); |
776 | addView(mJournalView); | 773 | addView(mJournalView); |
777 | } | 774 | } |
778 | 775 | ||
779 | showView(mJournalView); | 776 | showView(mJournalView); |
780 | mMainView->dateNavigator()->selectDates( 1 ); | 777 | mMainView->dateNavigator()->selectDates( 1 ); |
778 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ; | ||
781 | } | 779 | } |
782 | 780 | ||
783 | void KOViewManager::showTimeSpanView() | 781 | void KOViewManager::showTimeSpanView() |
784 | { | 782 | { |
785 | //mFlagShowNextxDays = false; | 783 | //mFlagShowNextxDays = false; |
786 | if (!mTimeSpanView) { | 784 | if (!mTimeSpanView) { |