373 //Something wrong. Exit here |
373 //Something wrong. Exit here |
374 DoMsgSaveExitL(); |
374 DoMsgSaveExitL(); |
375 return; |
375 return; |
376 } |
376 } |
377 |
377 |
|
378 TBool toolbarVisible = EFalse; |
378 #ifdef RD_SCALABLE_UI_V2 |
379 #ifdef RD_SCALABLE_UI_V2 |
379 if ((!iToolbar)&& (AknLayoutUtils::PenEnabled() && !msvEntry1.iBioType && !iFlags.iGms) ) |
380 if ((!iToolbar)&& (AknLayoutUtils::PenEnabled() && !msvEntry1.iBioType && !iFlags.iGms) ) |
380 { |
381 { |
381 CEikAppUiFactory* appUiFactory = static_cast<CEikAppUiFactory*>( iEikonEnv->AppUiFactory() ); |
382 CEikAppUiFactory* appUiFactory = static_cast<CEikAppUiFactory*>( iEikonEnv->AppUiFactory() ); |
382 CAknToolbar* oldFixedToolbar = appUiFactory->CurrentFixedToolbar(); |
383 CAknToolbar* oldFixedToolbar = appUiFactory->CurrentFixedToolbar(); |
390 oldFixedToolbar->SetToolbarVisibility( EFalse ); |
391 oldFixedToolbar->SetToolbarVisibility( EFalse ); |
391 } |
392 } |
392 |
393 |
393 appUiFactory->SetViewFixedToolbar( iToolbar ); |
394 appUiFactory->SetViewFixedToolbar( iToolbar ); |
394 iToolbar->SetToolbarVisibility( ETrue, EFalse ); |
395 iToolbar->SetToolbarVisibility( ETrue, EFalse ); |
395 } |
396 toolbarVisible = ETrue; |
396 |
397 } |
397 //handling the case of iToolbar already created [delete the toolbar incase of biomsgs] |
398 //handling the case of iToolbar already created [delete the toolbar incase of biomsgs] |
398 else if((iToolbar)&&(AknLayoutUtils::PenEnabled() && msvEntry1.iBioType && iFlags.iGms)) |
399 else if((iToolbar)&&(AknLayoutUtils::PenEnabled() && msvEntry1.iBioType && iFlags.iGms)) |
399 { |
400 { |
400 delete iToolbar; |
401 delete iToolbar; |
401 iToolbar = NULL; |
402 iToolbar = NULL; |
402 } |
403 } |
403 |
404 |
404 #endif |
405 #endif |
405 // Creating view (exits app immediately if fails) |
406 // Creating view (exits app immediately if fails) |
406 iView = CMsgEditorView::NewL( *this, CMsgEditorView::EMsgReadOnly ); |
407 iView = CMsgEditorView::NewL( *this, CMsgEditorView::EMsgReadOnly ); |
407 // get hands on entry |
408 // get hands on entry |
408 const CMsgSmsViewerDocument* doc = Document(); |
409 const CMsgSmsViewerDocument* doc = Document(); |
533 if ( AknLayoutUtils::PenEnabled() ) |
534 if ( AknLayoutUtils::PenEnabled() ) |
534 { |
535 { |
535 iNaviDecorator->SetNaviDecoratorObserver( this ); |
536 iNaviDecorator->SetNaviDecoratorObserver( this ); |
536 if ( iToolbar ) |
537 if ( iToolbar ) |
537 { |
538 { |
538 //By Default make take touchbar invisible, dimmed and disabled |
539 |
539 iToolbar->SetToolbarVisibility(EFalse, EFalse); |
540 if ( iFlags.iBioMsg || iFlags.iGms ) |
540 iToolbar->SetDimmed(ETrue); |
541 { |
541 iToolbar->DisableToolbarL( ETrue ); |
542 //By Default make take touchbar invisible, dimmed and disabled |
542 |
543 iToolbar->SetToolbarVisibility(EFalse, EFalse); |
|
544 iToolbar->SetDimmed(ETrue); |
|
545 iToolbar->DisableToolbarL( ETrue ); |
|
546 } |
|
547 |
543 //Test that message type is normal SMS |
548 //Test that message type is normal SMS |
544 if ( !iFlags.iBioMsg && !iFlags.iGms) |
549 if ( !iFlags.iBioMsg && !iFlags.iGms) |
545 { |
550 { |
546 //Enable the touchbar, make it visible and undimmed |
551 if(!toolbarVisible) |
547 iToolbar->DisableToolbarL( EFalse ); |
552 { |
548 iToolbar->SetDimmed(EFalse); |
553 //Enable the touchbar, make it visible and undimmed |
549 iToolbar->SetToolbarVisibility(ETrue, EFalse); |
554 iToolbar->DisableToolbarL( EFalse ); |
550 |
555 iToolbar->SetDimmed(EFalse); |
|
556 iToolbar->SetToolbarVisibility(ETrue, EFalse); |
|
557 } |
551 // default state, nothing dimmed. Uncomment the below lines only if necessary to force set it dim again |
558 // default state, nothing dimmed. Uncomment the below lines only if necessary to force set it dim again |
552 /* |
559 /* |
553 iToolbar->SetItemDimmed(ESmsViewerToolbarReply, EFalse, EFalse); |
560 iToolbar->SetItemDimmed(ESmsViewerToolbarReply, EFalse, EFalse); |
554 iToolbar->SetItemDimmed(ESmsViewerToolbarForward, EFalse, EFalse); |
561 iToolbar->SetItemDimmed(ESmsViewerToolbarForward, EFalse, EFalse); |
555 iToolbar->SetItemDimmed(ESmsViewerToolbarDelete, EFalse, ETrue); |
562 iToolbar->SetItemDimmed(ESmsViewerToolbarDelete, EFalse, ETrue); |
2047 ApproximateReplyForwardSize( aForward ))) |
2054 ApproximateReplyForwardSize( aForward ))) |
2048 { |
2055 { |
2049 User::Leave( KErrDiskFull ); |
2056 User::Leave( KErrDiskFull ); |
2050 } |
2057 } |
2051 |
2058 |
2052 |
2059 //to reduce flickering after sending a message. |
|
2060 if (!(iEditorBaseFeatures & EStayInViewerAfterReply )) |
|
2061 { |
|
2062 iToolbar->SetToolbarVisibility( EFalse ); |
|
2063 iView->MakeVisible( EFalse ); |
|
2064 iNaviDecorator->MakeVisible( EFalse ); |
|
2065 } |
2053 |
2066 |
2054 TRAPD(err, DoReplyFwdL( aForward )); |
2067 TRAPD(err, DoReplyFwdL( aForward )); |
2055 if(!(err == KErrNone) ) |
2068 if(!(err == KErrNone) ) |
2056 { |
2069 { |
|
2070 iNaviDecorator->MakeVisible( ETrue ); |
2057 iView->MakeVisible( ETrue ); |
2071 iView->MakeVisible( ETrue ); |
|
2072 iToolbar->SetToolbarVisibility( ETrue ); |
2058 } |
2073 } |
2059 |
2074 |
2060 } |
2075 } |
2061 |
2076 |
2062 // --------------------------------------------------------- |
2077 // --------------------------------------------------------- |