summaryrefslogtreecommitdiffabout
path: root/korganizer/koviewmanager.cpp
Unidiff
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koviewmanager.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index c6e76c4..5a2dce3 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -115,34 +115,35 @@ void KOViewManager::showDateView( int view, QDate date)
115 static int lastMode = 0; 115 static int lastMode = 0;
116 static int lastCount = 0; 116 static int lastCount = 0;
117 static bool lastNDMode = false; 117 static bool lastNDMode = false;
118 static QDate lastDate; 118 static QDate lastDate;
119 //qDebug("date %d %s", view, date.toString().latin1()); 119 //qDebug("date %d %s", view, date.toString().latin1());
120 120
121 if (view != 9) 121 if (view != 9)
122 lastMode = 0; 122 lastMode = 0;
123 //qDebug("%d %d ", lastNDMode, mFlagShowNextxDays ); 123 //qDebug("%d %d ", lastNDMode, mFlagShowNextxDays );
124 bool savemFlagShowNextxDays = mFlagShowNextxDays; 124 bool savemFlagShowNextxDays = mFlagShowNextxDays;
125 mFlagShowNextxDays = false; 125 mFlagShowNextxDays = false;
126 if ( view == 3 ) { 126 if ( view == 3 ) {
127 //mCurrentAgendaView = 1 ; 127 //mCurrentAgendaView = 1 ;
128 lastDate = mMainView->dateNavigator()->selectedDates().first(); 128 lastDate = mMainView->dateNavigator()->selectedDates().first();
129 lastCount = mMainView->dateNavigator()->selectedDates().count(); 129 lastCount = mMainView->dateNavigator()->selectedDates().count();
130 lastNDMode = savemFlagShowNextxDays; 130 lastNDMode = savemFlagShowNextxDays;
131 mMainView->showDay( date ); 131 mMainView->dateNavigator()->selectDate( date );
132 lastMode = 1; 132 lastMode = 1;
133 mCurrentAgendaView = 1 ;
133 } else if (view == 4 ) { 134 } else if (view == 4 ) {
134 mCurrentAgendaView = 7 ; 135 mCurrentAgendaView = 7 ;
135 mMainView->dateNavigator()->selectDates( date, 7 ); 136 mMainView->dateNavigator()->selectDates( date, 7 );
136 } else if (view == 5 ) { 137 } else if (view == 5 ) {
137 mCurrentAgendaView = 14 ; 138 mCurrentAgendaView = 14 ;
138 mMainView->dateNavigator()->selectDates( date, 14); 139 mMainView->dateNavigator()->selectDates( date, 14);
139 } else if (view == 6 ) { 140 } else if (view == 6 ) {
140 //mMainView->dateNavigator()->selectDates( date, 7 ); 141 //mMainView->dateNavigator()->selectDates( date, 7 );
141 showMonthView(); 142 showMonthView();
142 } else if (view == 7 ) { 143 } else if (view == 7 ) {
143 mMainView->dateNavigator()->selectDate( date ); 144 mMainView->dateNavigator()->selectDate( date );
144 showJournalView(); 145 showJournalView();
145 } else if (view == 8 ) { 146 } else if (view == 8 ) {
146 globalFlagBlockAgenda = 1; 147 globalFlagBlockAgenda = 1;
147 if ( mCurrentAgendaView != 3 ) 148 if ( mCurrentAgendaView != 3 )
148 mCurrentAgendaView = -1; 149 mCurrentAgendaView = -1;
@@ -564,32 +565,39 @@ void KOViewManager::showMonthViewWeek()
564 createMonthView(); 565 createMonthView();
565 globalFlagBlockAgenda = 1; 566 globalFlagBlockAgenda = 1;
566 bool full = true; 567 bool full = true;
567 if ( mCurrentView == mMonthView) 568 if ( mCurrentView == mMonthView)
568 full = mMainView->leftFrame()->isVisible(); 569 full = mMainView->leftFrame()->isVisible();
569 if ( !KOPrefs::instance()->mMonthViewWeek ) { 570 if ( !KOPrefs::instance()->mMonthViewWeek ) {
570 mMonthView->switchView(); 571 mMonthView->switchView();
571 if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) 572 if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() )
572 full = false; 573 full = false;
573 else 574 else
574 full = true; 575 full = true;
575 } 576 }
576 mMainView->dateNavigator()->selectWeek(); 577 mMainView->dateNavigator()->selectWeek();
577 showView(mMonthView, full ); 578 showView(mMonthView, full );
578} 579}
579 580
581void KOViewManager::showMonth( const QDate & date )
582{
583 mMainView->dateNavigator()->blockSignals( true );
584 mMainView->dateNavigator()->selectDate( date );
585 mMainView->dateNavigator()->blockSignals( false );
586 showMonthView();
587}
580void KOViewManager::showMonthView() 588void KOViewManager::showMonthView()
581 { 589 {
582 590
583 createMonthView(); 591 createMonthView();
584 globalFlagBlockAgenda = 1; 592 globalFlagBlockAgenda = 1;
585 //mFlagShowNextxDays = false; 593 //mFlagShowNextxDays = false;
586 bool full = true; 594 bool full = true;
587 if ( mCurrentView == mMonthView) 595 if ( mCurrentView == mMonthView)
588 full = mMainView->leftFrame()->isVisible(); 596 full = mMainView->leftFrame()->isVisible();
589 // if(mMonthView == mCurrentView) return; 597 // if(mMonthView == mCurrentView) return;
590 if ( KOPrefs::instance()->mMonthViewWeek ) { 598 if ( KOPrefs::instance()->mMonthViewWeek ) {
591 mMonthView->switchView(); 599 mMonthView->switchView();
592 if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) 600 if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() )
593 full = false; 601 full = false;
594 else 602 else
595 full = true; 603 full = true;