20 |
20 |
21 |
21 |
22 // INCLUDE FILES |
22 // INCLUDE FILES |
23 #include <bldvariant.hrh> |
23 #include <bldvariant.hrh> |
24 #include <featmgr.h> |
24 #include <featmgr.h> |
25 #include <mtmuidef.hrh> |
|
26 |
25 |
27 #include <messagingvariant.hrh> |
26 #include <messagingvariant.hrh> |
28 #include <centralrepository.h> |
27 #include <centralrepository.h> |
29 #include <messaginginternalcrkeys.h> |
28 #include <messaginginternalcrkeys.h> |
30 #include <CoreApplicationUIsSDKCRKeys.h> |
29 #include <CoreApplicationUIsSDKCRKeys.h> |
203 #define KUidMsgTypeFsMtmVal 0x2001F406 |
202 #define KUidMsgTypeFsMtmVal 0x2001F406 |
204 //CR:422-271 |
203 //CR:422-271 |
205 _LIT( KMmsMessageDumpDirectory, "C:\\Private\\1000484b\\mmsvar"); |
204 _LIT( KMmsMessageDumpDirectory, "C:\\Private\\1000484b\\mmsvar"); |
206 _LIT( KRootPath, "C:\\" ); |
205 _LIT( KRootPath, "C:\\" ); |
207 const TInt KMmsCodecClientChunkSize = 1024; |
206 const TInt KMmsCodecClientChunkSize = 1024; |
208 #define KMtmUiFunctionSimDialog ( KMtmFirstFreeMtmUiFunctionId + 1 ) |
207 |
209 // LOCAL FUNCTION PROTOTYPES |
208 // LOCAL FUNCTION PROTOTYPES |
210 |
209 |
211 // ==================== LOCAL FUNCTIONS ==================== |
210 // ==================== LOCAL FUNCTIONS ==================== |
212 // |
211 // |
213 |
212 |
231 iMoveOrCopyMailOperation(-1), |
230 iMoveOrCopyMailOperation(-1), |
232 iHandleNewMsgToInbox ( EFalse ), |
231 iHandleNewMsgToInbox ( EFalse ), |
233 iAnchorId( NULL ), |
232 iAnchorId( NULL ), |
234 iEmailClientIntegration(EFalse), |
233 iEmailClientIntegration(EFalse), |
235 iSelectableEmail(EFalse), |
234 iSelectableEmail(EFalse), |
236 iEmailFramework(EFalse), |
235 iEmailFramework(EFalse) |
237 iSimDialogOpen(EFalse) |
|
238 { |
236 { |
239 iMceUiFlags.SetMceFlag( EMceUiFlagsExitOnMsvMediaAvailableEvent ); |
237 iMceUiFlags.SetMceFlag( EMceUiFlagsExitOnMsvMediaAvailableEvent ); |
240 } |
238 } |
241 |
239 |
242 CMceUi::~CMceUi() |
240 CMceUi::~CMceUi() |
4490 } |
4487 } |
4491 |
4488 |
4492 TBuf8<1> buf; |
4489 TBuf8<1> buf; |
4493 if (!(aFunction.iFlags&EMtudAsynchronous)) |
4490 if (!(aFunction.iFlags&EMtudAsynchronous)) |
4494 { |
4491 { |
4495 if(aFunction.iFuncId == KMtmUiFunctionSimDialog) |
|
4496 { |
|
4497 iSimDialogOpen = ETrue; |
|
4498 } |
|
4499 mtmUi.InvokeSyncFunctionL(aFunction.iFuncId, *sel, buf); |
4492 mtmUi.InvokeSyncFunctionL(aFunction.iFuncId, *sel, buf); |
4500 } |
4493 } |
4501 else |
4494 else |
4502 { |
4495 { |
4503 CMsvSingleOpWatcher* singleOpWatcher = CMsvSingleOpWatcher::NewL( *this ); |
4496 CMsvSingleOpWatcher* singleOpWatcher = CMsvSingleOpWatcher::NewL( *this ); |
4977 void CMceUi::TabChangedL(TInt aIndex) |
4970 void CMceUi::TabChangedL(TInt aIndex) |
4978 { |
4971 { |
4979 TBool bOBoxOrMBox = EFalse ; |
4972 TBool bOBoxOrMBox = EFalse ; |
4980 if ( !MceViewActive( EMceMessageViewActive ) |
4973 if ( !MceViewActive( EMceMessageViewActive ) |
4981 && !MceViewActive( EMceDeliveryReportsViewActive ) ) |
4974 && !MceViewActive( EMceDeliveryReportsViewActive ) ) |
4982 { |
|
4983 return; |
|
4984 } |
|
4985 if( !MceViewActive( EMceDeliveryReportsViewActive ) && |
|
4986 iMceListView->MarkingMode() ) |
|
4987 { |
4975 { |
4988 return; |
4976 return; |
4989 } |
4977 } |
4990 TInt count = iTabsArray->Count(); |
4978 TInt count = iTabsArray->Count(); |
4991 TMsvId newId = KMsvGlobalInBoxIndexEntryId; |
4979 TMsvId newId = KMsvGlobalInBoxIndexEntryId; |
6664 // ---------------------------------------------------- |
6652 // ---------------------------------------------------- |
6665 // CMceUi::ResetAndHide |
6653 // CMceUi::ResetAndHide |
6666 // ---------------------------------------------------- |
6654 // ---------------------------------------------------- |
6667 void CMceUi::ResetAndHide() |
6655 void CMceUi::ResetAndHide() |
6668 { |
6656 { |
6669 if( MceViewActive( EMceMessageViewActive ) && iMceListView |
6657 // Messaging was not exiting properly when "exit" is pressed from settings dialog. |
6670 && iMceListView->MarkingMode() ) |
6658 // iMceUiFlags.MceFlag( EMceUiFlagsSettingsDialogOpen ) will be true |
6671 { |
6659 // when we exit from any of the settings Dialog. |
6672 iMceListView->SetMarkingModeOff(); |
6660 // Closing of Settings dialogs will be taken care by AVKON. |
6673 iMceListView->SetMarkingMode( EFalse ); |
6661 if( !(MceViewActive( EMceMainViewActive ) && IsForeground() ) || |
6674 RemoveTabs(); |
6662 iMceUiFlags.MceFlag( EMceUiFlagsSettingsDialogOpen ) ) |
6675 delete iDecoratedTabGroup; |
6663 { |
6676 iDecoratedTabGroup = NULL; |
|
6677 delete iTabsArray; |
|
6678 iTabsArray = NULL; |
|
6679 SetCustomControl(1); // Disable bring-to-foreground on view activation |
6664 SetCustomControl(1); // Disable bring-to-foreground on view activation |
6680 TRAP_IGNORE( CAknViewAppUi::CreateActivateViewEventL( \ |
6665 TRAP_IGNORE( CAknViewAppUi::CreateActivateViewEventL( \ |
6681 KMessagingCentreMainViewUid, \ |
6666 KMessagingCentreMainViewUid, \ |
6682 TUid::Uid(KMceHideInBackground), \ |
6667 TUid::Uid(KMceHideInBackground), \ |
6683 KNullDesC8 ) ) ; |
6668 KNullDesC8 ) ) ; |
6684 } |
|
6685 // Messaging was not exiting properly when "exit" is pressed from settings dialog. |
|
6686 // iMceUiFlags.MceFlag( EMceUiFlagsSettingsDialogOpen ) will be true |
|
6687 // when we exit from any of the settings Dialog. |
|
6688 // Closing of Settings dialogs will be taken care by AVKON. |
|
6689 else if (!(MceViewActive( EMceMainViewActive) && IsForeground()) || |
|
6690 iMceUiFlags.MceFlag( EMceUiFlagsSettingsDialogOpen ) || iSimDialogOpen ) |
|
6691 { |
|
6692 SetCustomControl(1); // Disable bring-to-foreground on view activation |
|
6693 TRAP_IGNORE( CAknViewAppUi::CreateActivateViewEventL( \ |
|
6694 KMessagingCentreMainViewUid, \ |
|
6695 TUid::Uid(KMceHideInBackground), \ |
|
6696 KNullDesC8 ) ) ; |
|
6697 iSimDialogOpen = EFalse; |
|
6698 } |
6669 } |
6699 else |
6670 else |
6700 { |
6671 { |
6701 SetCustomControl(0); // Enable bring-to-foreground on view activation |
6672 SetCustomControl(0); // Enable bring-to-foreground on view activation |
6702 } |
6673 } |