203 CAknEnv* env = iAvkonEnv; |
203 CAknEnv* env = iAvkonEnv; |
204 CAknSettingCache& cache = env->SettingCache(); |
204 CAknSettingCache& cache = env->SettingCache(); |
205 cache.RegisterPluginL( &( iMsgEditorAppUiExtension->iSettingCachePlugin ) ); |
205 cache.RegisterPluginL( &( iMsgEditorAppUiExtension->iSettingCachePlugin ) ); |
206 |
206 |
207 iStatusPaneRes = StatusPane()->CurrentLayoutResId(); |
207 iStatusPaneRes = StatusPane()->CurrentLayoutResId(); |
|
208 |
|
209 iIterator = NULL; |
208 } |
210 } |
209 |
211 |
210 // --------------------------------------------------------- |
212 // --------------------------------------------------------- |
211 // CMsgEditorAppUi::~CMsgEditorAppUi |
213 // CMsgEditorAppUi::~CMsgEditorAppUi |
212 // |
214 // |
332 { |
336 { |
333 aForward = !aForward; |
337 aForward = !aForward; |
334 } |
338 } |
335 |
339 |
336 iMsgNaviDirection = aForward; |
340 iMsgNaviDirection = aForward; |
|
341 |
|
342 // Check if next/previous message |
|
343 __ASSERT_DEBUG( iIterator != NULL, Panic( ENullPointer1 ) ); |
|
344 if ( aForward ) |
|
345 { |
|
346 iIterator->SetNextMessage(); |
|
347 |
|
348 } |
|
349 else |
|
350 { |
|
351 iIterator->SetPreviousMessage(); |
|
352 } |
|
353 |
|
354 RProperty::Set( KPSUidMuiu, KMuiuKeyNextMsg, |
|
355 iIterator->CurrentMessage().Id() ); |
|
356 |
337 #ifdef RD_MSG_FAST_PREV_NEXT |
357 #ifdef RD_MSG_FAST_PREV_NEXT |
338 // Check if next/previous message can be fast opened by viewer |
358 // Check if next/previous message can be fast opened by viewer |
339 __ASSERT_DEBUG( iIterator != NULL, Panic( ENullPointer1 ) ); |
359 |
340 if ( aForward ) |
|
341 { |
|
342 iIterator->SetNextMessage(); |
|
343 } |
|
344 else |
|
345 { |
|
346 iIterator->SetPreviousMessage(); |
|
347 } |
|
348 |
|
349 if ( CanFastOpenL( *iIterator) ) |
360 if ( CanFastOpenL( *iIterator) ) |
350 { |
361 { |
351 // Load next/previous message |
362 // Load next/previous message |
352 TRAPD( err, Document()->SetEntryL( iIterator->CurrentMessage().Id() ) ); |
363 TRAPD( err, Document()->SetEntryL( iIterator->CurrentMessage().Id() ) ); |
353 // If fast open fails, view is incompletely constructed |
364 // If fast open fails, view is incompletely constructed |
374 CMsgEmbeddedEditorWatchingOperation::EMsgExitPrevious); |
385 CMsgEmbeddedEditorWatchingOperation::EMsgExitPrevious); |
375 Exit( iExitMode ); |
386 Exit( iExitMode ); |
376 } |
387 } |
377 else if ( err != KErrNone ) |
388 else if ( err != KErrNone ) |
378 { |
389 { |
|
390 // Reset the KMuiuKeyNextMsg to 0 |
|
391 RProperty::Set( KPSUidMuiu, KMuiuKeyNextMsg,0 ); |
379 // Unknown error during quick launch. |
392 // Unknown error during quick launch. |
380 iCoeEnv->HandleError( err ); |
393 iCoeEnv->HandleError( err ); |
381 iExitMode = MApaEmbeddedDocObserver::ENoChanges; |
394 iExitMode = MApaEmbeddedDocObserver::ENoChanges; |
382 Exit( EAknSoftkeyClose ); |
395 Exit( EAknSoftkeyClose ); |
383 } |
396 } |
407 |
420 |
408 if ( iEikonEnv->StartedAsServerApp() ) |
421 if ( iEikonEnv->StartedAsServerApp() ) |
409 { |
422 { |
410 CMsgEditorDocument* doc = Document(); |
423 CMsgEditorDocument* doc = Document(); |
411 |
424 |
412 if ( iIterator == NULL ) |
425 //We should not create iterator here navi pane iterator |
413 { |
426 //will be refered in CMsgEditorAppUi |
414 iIterator = CMessageIterator::NewL( doc->Session(), doc->Entry() ); |
427 |
415 iIterator->SetMessageIteratorObserver( this ); |
428 __ASSERT_DEBUG( iIterator != NULL, Panic( ENullPointer1 ) ); |
416 } |
|
417 |
|
418 // Next is ETrue if layout is EAknLayoutIdABRW, |
429 // Next is ETrue if layout is EAknLayoutIdABRW, |
419 // EFalse if EAknLayoutIdELAF or EAknLayoutIdAPAC |
430 // EFalse if EAknLayoutIdELAF or EAknLayoutIdAPAC |
420 if ( AknLayoutUtils::LayoutMirrored() ) |
431 if ( AknLayoutUtils::LayoutMirrored() ) |
421 { |
432 { |
422 aForward = !aForward; |
433 aForward = !aForward; |
451 TInt& aMsgsInFolder ) |
462 TInt& aMsgsInFolder ) |
452 { |
463 { |
453 if ( iEikonEnv->StartedAsServerApp() ) |
464 if ( iEikonEnv->StartedAsServerApp() ) |
454 { |
465 { |
455 CMsgEditorDocument* doc = Document(); |
466 CMsgEditorDocument* doc = Document(); |
456 |
467 //We should not create iterator here, navi pane iterator |
457 if ( iIterator == NULL ) |
468 //will be refered in CMsgEditorAppUi |
458 { |
469 __ASSERT_DEBUG( iIterator != NULL, Panic( ENullPointer1 ) ); |
459 iIterator = CMessageIterator::NewL( doc->Session(), doc->Entry() ); |
|
460 iIterator->SetMessageIteratorObserver( this ); |
|
461 } |
|
462 |
470 |
463 aCurrentIndex = iIterator->CurrentMessageIndex(); |
471 aCurrentIndex = iIterator->CurrentMessageIndex(); |
464 aMsgsInFolder = iIterator->MessagesInFolder(); |
472 aMsgsInFolder = iIterator->MessagesInFolder(); |
465 } |
473 } |
466 else |
474 else |
1647 naviPaneControl->SetPriorityIndicatorL( aPriority ); |
1655 naviPaneControl->SetPriorityIndicatorL( aPriority ); |
1648 |
1656 |
1649 CMsgEditorDocument* doc = Document(); |
1657 CMsgEditorDocument* doc = Document(); |
1650 naviPaneControl->SetNavigationIndicatorL( doc->Session(), doc->Entry() ); |
1658 naviPaneControl->SetNavigationIndicatorL( doc->Session(), doc->Entry() ); |
1651 |
1659 |
|
1660 // this function will always be called when viwer is launched |
|
1661 // always navi decorater will be created. |
|
1662 // refer navi decorator iterator instance here |
|
1663 iIterator = naviPaneControl->GetMessageIterator(); |
|
1664 iIterator->SetMessageIteratorObserver( this ); |
|
1665 |
1652 iNaviDecorator->SetContainerWindowL( *naviContainer ); |
1666 iNaviDecorator->SetContainerWindowL( *naviContainer ); |
1653 iNaviDecorator->MakeScrollButtonVisible( EFalse ); |
1667 iNaviDecorator->MakeScrollButtonVisible( EFalse ); |
1654 iNaviDecorator->SetComponentsToInheritVisibility( ETrue ); |
1668 iNaviDecorator->SetComponentsToInheritVisibility( ETrue ); |
1655 iOwnNaviPane = NULL; |
1669 iOwnNaviPane = NULL; |
1656 } |
1670 } |