-rw-r--r-- | korganizer/koviewmanager.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 35774d6..2cd8792 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -195,51 +195,54 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) | |||
195 | } else { | 195 | } else { |
196 | mCurrentView = view; | 196 | mCurrentView = view; |
197 | // bool full = fullScreen; | 197 | // bool full = fullScreen; |
198 | bool isFull = !mMainView->leftFrame()->isVisible(); | 198 | bool isFull = !mMainView->leftFrame()->isVisible(); |
199 | if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) | 199 | if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) |
200 | full = true; | 200 | full = true; |
201 | if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) | 201 | if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) |
202 | full = false; | 202 | full = false; |
203 | } | 203 | } |
204 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); | 204 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); |
205 | //raiseCurrentView( full ); | 205 | //raiseCurrentView( full ); |
206 | mMainView->processIncidenceSelection( 0 ); | 206 | mMainView->processIncidenceSelection( 0 ); |
207 | mMainView->updateView(); | 207 | //mMainView->updateView(); |
208 | raiseCurrentView( full ); | 208 | raiseCurrentView( full, true ); |
209 | mMainView->adaptNavigationUnits(); | 209 | mMainView->adaptNavigationUnits(); |
210 | } | 210 | } |
211 | 211 | ||
212 | void KOViewManager::raiseCurrentView( bool fullScreen ) | 212 | void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) |
213 | { | 213 | { |
214 | mCurrentAgendaView = 0; | 214 | mCurrentAgendaView = 0; |
215 | int wid = mMainView->width() ; | 215 | int wid = mMainView->width() ; |
216 | int hei = mMainView->height(); | 216 | int hei = mMainView->height(); |
217 | if ( mCurrentView == mMonthView ) { | 217 | if ( mCurrentView == mMonthView ) { |
218 | mMainView->navigatorBar()->show(); | 218 | mMainView->navigatorBar()->show(); |
219 | hei -= mMainView->navigatorBar()->sizeHint().height(); | 219 | hei -= mMainView->navigatorBar()->sizeHint().height(); |
220 | //mMainView->navigatorBar()->hide(); | 220 | //mMainView->navigatorBar()->hide(); |
221 | } else { | 221 | } else { |
222 | mMainView->navigatorBar()->hide(); | 222 | mMainView->navigatorBar()->hide(); |
223 | } | 223 | } |
224 | if ( fullScreen ) { | 224 | if ( fullScreen ) { |
225 | mMainView->leftFrame()->hide(); | 225 | mMainView->leftFrame()->hide(); |
226 | } else { | 226 | } else { |
227 | mMainView->leftFrame()->show(); | 227 | mMainView->leftFrame()->show(); |
228 | if ( KOPrefs::instance()->mVerticalScreen ) | 228 | if ( KOPrefs::instance()->mVerticalScreen ) |
229 | hei -= mMainView->leftFrame()->height(); | 229 | hei -= mMainView->leftFrame()->height(); |
230 | else | 230 | else |
231 | wid -= mMainView->leftFrame()->width(); | 231 | wid -= mMainView->leftFrame()->width(); |
232 | } | 232 | } |
233 | emit signalFullScreen( !fullScreen ); | 233 | emit signalFullScreen( !fullScreen ); |
234 | if ( callUpdateView ) | ||
235 | mMainView->updateView(); | ||
236 | |||
234 | if ( globalFlagBlockAgenda == 5 ) { | 237 | if ( globalFlagBlockAgenda == 5 ) { |
235 | globalFlagBlockAgenda = 4; | 238 | globalFlagBlockAgenda = 4; |
236 | globalFlagBlockAgendaItemPaint = 1; | 239 | globalFlagBlockAgendaItemPaint = 1; |
237 | } | 240 | } |
238 | mMainView->viewStack()->raiseWidget(mCurrentView); | 241 | mMainView->viewStack()->raiseWidget(mCurrentView); |
239 | if ( globalFlagBlockAgenda == 4 ) { | 242 | if ( globalFlagBlockAgenda == 4 ) { |
240 | if ( mCurrentView == mAgendaView ) { | 243 | if ( mCurrentView == mAgendaView ) { |
241 | //globalFlagBlockAgenda =1 ; | 244 | //globalFlagBlockAgenda =1 ; |
242 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) | 245 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) |
243 | mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins ); | 246 | mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins ); |
244 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) | 247 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) |
245 | mAgendaView->setStartHour( QTime::currentTime ().hour() ); | 248 | mAgendaView->setStartHour( QTime::currentTime ().hour() ); |
@@ -263,25 +266,25 @@ void KOViewManager::updateView() | |||
263 | if ( mTodoView == mCurrentView ) | 266 | if ( mTodoView == mCurrentView ) |
264 | return; | 267 | return; |
265 | if ( mCurrentView ) mCurrentView->updateView(); | 268 | if ( mCurrentView ) mCurrentView->updateView(); |
266 | 269 | ||
267 | } | 270 | } |
268 | 271 | ||
269 | void KOViewManager::updateView(const QDate &start, const QDate &end) | 272 | void KOViewManager::updateView(const QDate &start, const QDate &end) |
270 | { | 273 | { |
271 | // kdDebug() << "KOViewManager::updateView()" << endl; | 274 | // kdDebug() << "KOViewManager::updateView()" << endl; |
272 | 275 | ||
273 | if (mCurrentView) mCurrentView->showDates(start, end); | 276 | if (mCurrentView) mCurrentView->showDates(start, end); |
274 | 277 | ||
275 | if (mTodoView) mTodoView->updateView(); | 278 | if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView(); |
276 | } | 279 | } |
277 | 280 | ||
278 | 281 | ||
279 | void KOViewManager::updateWNview() | 282 | void KOViewManager::updateWNview() |
280 | { | 283 | { |
281 | if ( mCurrentView == mWhatsNextView && mWhatsNextView ) | 284 | if ( mCurrentView == mWhatsNextView && mWhatsNextView ) |
282 | mWhatsNextView->updateView(); | 285 | mWhatsNextView->updateView(); |
283 | 286 | ||
284 | } | 287 | } |
285 | void KOViewManager::showWhatsNextView() | 288 | void KOViewManager::showWhatsNextView() |
286 | { | 289 | { |
287 | if (!mWhatsNextView) { | 290 | if (!mWhatsNextView) { |
@@ -511,25 +514,27 @@ void KOViewManager::showMonthView() | |||
511 | mMainView, SLOT ( showDay( QDate ) ) ); | 514 | mMainView, SLOT ( showDay( QDate ) ) ); |
512 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); | 515 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); |
513 | connect( mMonthView, SIGNAL(nextMonth() ), | 516 | connect( mMonthView, SIGNAL(nextMonth() ), |
514 | mMainView->navigatorBar(), SIGNAL(goNextMonth() ) ); | 517 | mMainView->navigatorBar(), SIGNAL(goNextMonth() ) ); |
515 | connect( mMonthView, SIGNAL(prevMonth() ), | 518 | connect( mMonthView, SIGNAL(prevMonth() ), |
516 | mMainView->navigatorBar(), SIGNAL(goPrevMonth() ) ); | 519 | mMainView->navigatorBar(), SIGNAL(goPrevMonth() ) ); |
517 | mMonthView->updateConfig(); | 520 | mMonthView->updateConfig(); |
518 | } | 521 | } |
519 | 522 | ||
520 | globalFlagBlockAgenda = 1; | 523 | globalFlagBlockAgenda = 1; |
521 | //mFlagShowNextxDays = false; | 524 | //mFlagShowNextxDays = false; |
522 | // if(mMonthView == mCurrentView) return; | 525 | // if(mMonthView == mCurrentView) return; |
526 | mMainView->dateNavigator()->blockSignals( true ); | ||
523 | mMainView->dateNavigator()->selectMonth(); | 527 | mMainView->dateNavigator()->selectMonth(); |
528 | mMainView->dateNavigator()->blockSignals( false); | ||
524 | // DateList tmpList = mMainView->dateNavigator()->selectedDates( ); | 529 | // DateList tmpList = mMainView->dateNavigator()->selectedDates( ); |
525 | //mMonthView->showDates(tmpList.first(), tmpList.last()); | 530 | //mMonthView->showDates(tmpList.first(), tmpList.last()); |
526 | 531 | ||
527 | showView(mMonthView, true ); | 532 | showView(mMonthView, true ); |
528 | 533 | ||
529 | } | 534 | } |
530 | 535 | ||
531 | void KOViewManager::showTodoView() | 536 | void KOViewManager::showTodoView() |
532 | { | 537 | { |
533 | //mFlagShowNextxDays = false; | 538 | //mFlagShowNextxDays = false; |
534 | if ( !mTodoView ) { | 539 | if ( !mTodoView ) { |
535 | mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), | 540 | mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), |