-rw-r--r-- | korganizer/koviewmanager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 3aa9b6c..2e5a943 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -314,12 +314,13 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) | |||
314 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); | 314 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); |
315 | //raiseCurrentView( full ); | 315 | //raiseCurrentView( full ); |
316 | mMainView->processIncidenceSelection( 0 ); | 316 | mMainView->processIncidenceSelection( 0 ); |
317 | //mMainView->updateView(); | 317 | //mMainView->updateView(); |
318 | raiseCurrentView( full, callupdate ); | 318 | raiseCurrentView( full, callupdate ); |
319 | mMainView->adaptNavigationUnits(); | 319 | mMainView->adaptNavigationUnits(); |
320 | mMainView->updateUnmanagedViews(); | ||
320 | } | 321 | } |
321 | 322 | ||
322 | void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) | 323 | void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) |
323 | { | 324 | { |
324 | mCurrentAgendaView = 0; | 325 | mCurrentAgendaView = 0; |
325 | if ( fullScreen ) { | 326 | if ( fullScreen ) { |
@@ -394,12 +395,13 @@ void KOViewManager::showWhatsNextView() | |||
394 | connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); | 395 | connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); |
395 | addView(mWhatsNextView); | 396 | addView(mWhatsNextView); |
396 | connect(this, SIGNAL( printWNV() ), | 397 | connect(this, SIGNAL( printWNV() ), |
397 | mWhatsNextView, SLOT( printMe() ) ); | 398 | mWhatsNextView, SLOT( printMe() ) ); |
398 | } | 399 | } |
399 | globalFlagBlockAgenda = 1; | 400 | globalFlagBlockAgenda = 1; |
401 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW; | ||
400 | showView(mWhatsNextView, true ); | 402 | showView(mWhatsNextView, true ); |
401 | //mWhatsNextView->updateView(); | 403 | //mWhatsNextView->updateView(); |
402 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW; | 404 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW; |
403 | } | 405 | } |
404 | 406 | ||
405 | void KOViewManager::slotprintWNV() | 407 | void KOViewManager::slotprintWNV() |
@@ -440,12 +442,13 @@ void KOViewManager::showListView() | |||
440 | globalFlagBlockAgenda = 1; | 442 | globalFlagBlockAgenda = 1; |
441 | if ( KOPrefs::instance()->mListViewMonthTimespan ) { | 443 | if ( KOPrefs::instance()->mListViewMonthTimespan ) { |
442 | mMainView->setBlockShowDates( true ); | 444 | mMainView->setBlockShowDates( true ); |
443 | mMainView->dateNavigator()->selectMonth(); | 445 | mMainView->dateNavigator()->selectMonth(); |
444 | mMainView->setBlockShowDates( false ); | 446 | mMainView->setBlockShowDates( false ); |
445 | } | 447 | } |
448 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW; | ||
446 | showView(mListView, KOPrefs::instance()->mFullViewTodo); | 449 | showView(mListView, KOPrefs::instance()->mFullViewTodo); |
447 | //mFlagShowNextxDays = temp; | 450 | //mFlagShowNextxDays = temp; |
448 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW; | 451 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW; |
449 | } | 452 | } |
450 | 453 | ||
451 | void KOViewManager::showAgendaView( bool fullScreen ) | 454 | void KOViewManager::showAgendaView( bool fullScreen ) |
@@ -507,12 +510,13 @@ void KOViewManager::showAgendaView( bool fullScreen ) | |||
507 | connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), | 510 | connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), |
508 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); | 511 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); |
509 | mAgendaView->readSettings(); | 512 | mAgendaView->readSettings(); |
510 | mAgendaView->updateConfig(); | 513 | mAgendaView->updateConfig(); |
511 | } | 514 | } |
512 | 515 | ||
516 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; | ||
513 | showView( mAgendaView, full); | 517 | showView( mAgendaView, full); |
514 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; | 518 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; |
515 | } | 519 | } |
516 | 520 | ||
517 | void KOViewManager::showDayView() | 521 | void KOViewManager::showDayView() |
518 | { | 522 | { |
@@ -565,12 +569,13 @@ void KOViewManager::showWeekView() | |||
565 | mCurrentAgendaView = 7 ; | 569 | mCurrentAgendaView = 7 ; |
566 | } | 570 | } |
567 | 571 | ||
568 | void KOViewManager::showNextXView() | 572 | void KOViewManager::showNextXView() |
569 | { | 573 | { |
570 | 574 | ||
575 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; | ||
571 | globalFlagBlockAgenda = 1; | 576 | globalFlagBlockAgenda = 1; |
572 | if ( mCurrentAgendaView != 3 ) | 577 | if ( mCurrentAgendaView != 3 ) |
573 | mCurrentAgendaView = -1; | 578 | mCurrentAgendaView = -1; |
574 | showAgendaView(KOPrefs::instance()->mFullViewMonth); | 579 | showAgendaView(KOPrefs::instance()->mFullViewMonth); |
575 | globalFlagBlockAgenda = 2; | 580 | globalFlagBlockAgenda = 2; |
576 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), | 581 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), |
@@ -652,12 +657,13 @@ if (!mMonthView) { | |||
652 | 657 | ||
653 | } | 658 | } |
654 | } | 659 | } |
655 | void KOViewManager::showMonthViewWeek() | 660 | void KOViewManager::showMonthViewWeek() |
656 | { | 661 | { |
657 | createMonthView(); | 662 | createMonthView(); |
663 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ; | ||
658 | globalFlagBlockAgenda = 1; | 664 | globalFlagBlockAgenda = 1; |
659 | bool full = true; | 665 | bool full = true; |
660 | if ( mCurrentView == mMonthView) | 666 | if ( mCurrentView == mMonthView) |
661 | full = mMainView->leftFrame()->isVisible(); | 667 | full = mMainView->leftFrame()->isVisible(); |
662 | if ( !KOPrefs::instance()->mMonthViewWeek ) { | 668 | if ( !KOPrefs::instance()->mMonthViewWeek ) { |
663 | mMonthView->switchView(); | 669 | mMonthView->switchView(); |
@@ -680,12 +686,13 @@ void KOViewManager::showMonth( const QDate & date ) | |||
680 | showMonthView(); | 686 | showMonthView(); |
681 | } | 687 | } |
682 | void KOViewManager::showMonthView() | 688 | void KOViewManager::showMonthView() |
683 | { | 689 | { |
684 | 690 | ||
685 | createMonthView(); | 691 | createMonthView(); |
692 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ; | ||
686 | globalFlagBlockAgenda = 1; | 693 | globalFlagBlockAgenda = 1; |
687 | //mFlagShowNextxDays = false; | 694 | //mFlagShowNextxDays = false; |
688 | bool full = true; | 695 | bool full = true; |
689 | if ( mCurrentView == mMonthView) | 696 | if ( mCurrentView == mMonthView) |
690 | full = mMainView->leftFrame()->isVisible(); | 697 | full = mMainView->leftFrame()->isVisible(); |
691 | // if(mMonthView == mCurrentView) return; | 698 | // if(mMonthView == mCurrentView) return; |
@@ -751,12 +758,13 @@ void KOViewManager::showTodoView() | |||
751 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 758 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
752 | KConfig *config = KOGlobals::config(); | 759 | KConfig *config = KOGlobals::config(); |
753 | mTodoView->restoreLayout(config,"Todo View"); | 760 | mTodoView->restoreLayout(config,"Todo View"); |
754 | mTodoView->setNavigator( mMainView->dateNavigator() ); | 761 | mTodoView->setNavigator( mMainView->dateNavigator() ); |
755 | } | 762 | } |
756 | 763 | ||
764 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ; | ||
757 | globalFlagBlockAgenda = 1; | 765 | globalFlagBlockAgenda = 1; |
758 | showView( mTodoView, true ); | 766 | showView( mTodoView, true ); |
759 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ; | 767 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ; |
760 | 768 | ||
761 | } | 769 | } |
762 | 770 | ||
@@ -769,12 +777,13 @@ void KOViewManager::showJournalView() | |||
769 | connect( mMainView, SIGNAL( configChanged() ), mJournalView, | 777 | connect( mMainView, SIGNAL( configChanged() ), mJournalView, |
770 | SLOT( updateConfig() ) ); | 778 | SLOT( updateConfig() ) ); |
771 | connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) ); | 779 | connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) ); |
772 | addView(mJournalView); | 780 | addView(mJournalView); |
773 | } | 781 | } |
774 | 782 | ||
783 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ; | ||
775 | showView(mJournalView); | 784 | showView(mJournalView); |
776 | mMainView->dateNavigator()->selectDates( 1 ); | 785 | mMainView->dateNavigator()->selectDates( 1 ); |
777 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ; | 786 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ; |
778 | } | 787 | } |
779 | 788 | ||
780 | void KOViewManager::showTimeSpanView() | 789 | void KOViewManager::showTimeSpanView() |