diff -r 5586b4d2ec3e -r 0d28c1c5b6dd phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDlgImpl.cpp --- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDlgImpl.cpp Wed Apr 14 15:45:35 2010 +0300 +++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDlgImpl.cpp Tue Apr 27 16:23:35 2010 +0300 @@ -69,6 +69,7 @@ #include "Pbk2IconId.hrh" #include #include +#include // Virtual Phonebook #include @@ -237,6 +238,7 @@ if (iNaviContainer) { iNaviContainer->Pop(); + TRAP_IGNORE(RestorePrevNaviDecoratorL()); } delete iStoreContact; @@ -937,6 +939,7 @@ if (iNaviContainer) { iNaviContainer->Pop(); + RestorePrevNaviDecoratorL(); iNaviContainer = NULL; } @@ -965,6 +968,7 @@ if (iNaviContainer) { iNaviContainer->Pop(); + RestorePrevNaviDecoratorL(); iNaviContainer = NULL; } @@ -1544,7 +1548,6 @@ IdOfFocusControl()); if (iParams.iActiveView == TPbk2ContactEditorParams::EEditorView) { - DimItem(aMenuPane, EPbk2ExtensionAssignFromMapSelect); DimItem(aMenuPane, EPbk2ExtensionAssignFromMap); if (current && current->ContactEditorUIField() && Pbk2AddressTools::MapCtrlTypeToAddress( @@ -1561,12 +1564,6 @@ } else { - if (!current || !current->ContactEditorUIField() - || current->ContactEditorUIField()->UIField()->CtrlType() - != EPbk2FieldCtrlTypeExtAssignFromMapsEditor) - { - DimItem(aMenuPane, EPbk2ExtensionAssignFromMapSelect); - } DimItem(aMenuPane, EPbk2CmdAddItem); DimItem(aMenuPane, EPbk2CmdEditorOpen); DimItem(aMenuPane, EPbk2CmdDeleteItem); @@ -1640,6 +1637,7 @@ if (iNaviContainer) { iNaviContainer->Pop(); + RestorePrevNaviDecoratorL(); iNaviContainer = NULL; } MakeVisible( EFalse ); @@ -2484,6 +2482,9 @@ iNaviContainer = static_cast (statusPane->ControlL( TUid::Uid(EEikStatusPaneUidNavi))); + + iPrevNaviDecorator = iNaviContainer->Top(); + iNaviContainer->PushDefaultL(ETrue); } } @@ -3425,6 +3426,44 @@ // void CPbk2ContactEditorDlgImpl::HandleGainingForeground() { + /* + * iAppServices is provided to enable editor use outside from pbk2 context + * no need to disable startup monitor in that case + */ + if( !iAppServices ) + { + MPbk2AppUi* pbk2AppUI = NULL; + pbk2AppUI = Phonebook2::Pbk2AppUi(); + + if ( pbk2AppUI && pbk2AppUI->Pbk2StartupMonitor() ) + { + TAny* extension = pbk2AppUI->Pbk2StartupMonitor() + ->StartupMonitorExtension( KPbk2StartupMonitorExtensionUid ); + + if( extension ) + { + MPbk2StartupMonitorExtension* startupMonitorExtension = + static_cast( extension ); + + if( startupMonitorExtension ) + { + startupMonitorExtension->DisableMonitoring(); + } + } + } + } + } + +// -------------------------------------------------------------------------- +// CPbk2ContactEditorDlgImpl::RestorePrevNaviDecoratorL +// -------------------------------------------------------------------------- +// +void CPbk2ContactEditorDlgImpl::RestorePrevNaviDecoratorL() + { + if ( iNaviContainer && iPrevNaviDecorator ) + { + iNaviContainer->PushL(*iPrevNaviDecorator); + } }