diff -r 85902f042028 -r a5e7a4f63858 commonuis/CommonUi/src/FindItemMenu.cpp --- a/commonuis/CommonUi/src/FindItemMenu.cpp Wed Sep 15 12:29:17 2010 +0300 +++ b/commonuis/CommonUi/src/FindItemMenu.cpp Wed Oct 13 14:50:15 2010 +0300 @@ -623,6 +623,7 @@ tempBuf); index = EFindItemCmdGoToUrl; + // Add bookmark iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_ADD_BOOKMARK ); @@ -633,7 +634,7 @@ 0, tempBuf ); index = EFindItemCmdAddToBookmark; - + } else { @@ -645,6 +646,7 @@ tempBuf ); index = EFindItemCmdGoToRstp; + iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_ADD_TO_GALLERY ); AddMenuItemL( @@ -654,7 +656,7 @@ 0, tempBuf ); index = EFindItemCmdAddToGallery; - + } break; } @@ -882,69 +884,20 @@ // Replace cmd call with AIW menu if more than one option available in AIW // menu // Note: count of VoIP profiles is not static. If phone contains VoIP - // profiles there must be Internet call command in call submenu. - // No context sensitive menu now. And new requirement is to show - // call menu for normal item and voip menu for sip address if voip is enabled. + // profiles there must be Internet call command in call submenu. TInt dummy = 0; - if ( itemType == CItemFinder::EEmailAddress && - iFindItemVoIPExtension->IsVoIPSupported() && - iFindItemVoIPExtension->VoIPProfilesExistL() && - iMenuPane->MenuItemExists( EFindItemCmdCall, dummy ) && - !( iMenuItemFlags & CFindItemMenu::ECallItem ) - ) - { - // CMyMenuPane is used only to get the aiw menu item - // for sip address, as it is an argument of the InitializeMenuPaneL - CMyMenuPane* aiwVoipMenu = - new ( ELeave ) CMyMenuPane( ( MEikMenuObserver* )this ); // not used really - CleanupStack::PushL( aiwVoipMenu ); - TResourceReader callUiReader; - iCoeEnv->CreateResourceReaderLC( - callUiReader, R_FINDMENU_CALLUI_AIW_SUBMENU ); - aiwVoipMenu->ConstructFromResourceL( callUiReader ); - CleanupStack::PopAndDestroy(); // callUiReader - - CAiwGenericParamList* inList = CAiwGenericParamList::NewLC(); - - // For SIP Address, use sip parameters - TAiwGenericParam param( EGenericParamSIPAddress ); - - // get the aiw menu item for sip address - inList->AppendL( param ); - iServiceHandler->InitializeMenuPaneL( - *( CEikMenuPane* )aiwVoipMenu, - R_FINDMENU_CALLUI_AIW_SUBMENU, - EFindMenuPlaceHolderCallUI, - *inList ); - - // Add all the menus for aiw to context main menu now. - for ( TInt i = 0; i < aiwVoipMenu->NumberOfItemsInPane(); i++ ) - { - iMenuPane->AddMenuItemL( aiwVoipMenu->ItemDataByIndexL( i ), EFindItemCmdCall ); - } - - // Now options of VOIP call and voice call are exclusive. - // For email( sip ) address, voip is used. So set the call - // menu to dimmed. + if ( ( !iHideCallMenu || + ( iFindItemVoIPExtension->IsVoIPSupported() && + iFindItemVoIPExtension->VoIPProfilesExistL() ) ) && + iMenuPane->MenuItemExists( EFindItemCmdCall, dummy ) ) + { iMenuPane->SetItemDimmed( EFindItemCmdCall, ETrue ); - - CleanupStack::PopAndDestroy( inList ); - CleanupStack::PopAndDestroy( aiwVoipMenu ); + iMenuPane->AddMenuItemsL( + R_FINDMENU_CALLUI_AIW_ITEM, + EFindItemCmdCall ); } } - -// ----------------------------------------------------------------------------- -// CFindItemMenu::SetCallSubMenuVisibility -// Sets AIW submenu visibility -// ----------------------------------------------------------------------------- -// -EXPORT_C void CFindItemMenu::SetCallSubMenuVisibility( TBool aVisible ) - { - iHideCallSubMenu = !aVisible; - } - - EXPORT_C void CFindItemMenu::HandleItemFinderCommandL( TInt aCommand ) { switch ( aCommand ) @@ -968,7 +921,7 @@ #ifndef RD_UNIFIED_EDITOR if ( !iEmailOverSmsFeatureSupported ) { - mtmFilter->AppendL(KSenduiMtmSmsUid); + mtmFilter->AppendL(KSenduiMtmSmsUid); } // Hide MMS if not supported if (!iMMSFeatureSupported) @@ -980,7 +933,7 @@ // Hide E-Mail if nosupported or phonenumber if ( !iEmailUiFeatureSupported || itemType == CItemFinder::EPhoneNumber ) { - mtmFilter->AppendL(KSenduiMtmSmtpUid); + mtmFilter->AppendL(KSenduiMtmSmtpUid); mtmFilter->AppendL(KSenduiMtmImap4Uid); mtmFilter->AppendL(KSenduiMtmPop3Uid); mtmFilter->AppendL(KSenduiMtmSyncMLEmailUid); @@ -988,7 +941,7 @@ // Hide Audio if not supported or E-mail address if( !iAudioMessagingFeatureSupported || itemType == CItemFinder::EEmailAddress) { - mtmFilter->AppendL(KSenduiMtmAudioMessageUid); + mtmFilter->AppendL(KSenduiMtmAudioMessageUid); } TUid uid = iSendUi->ShowTypedQueryL( CSendUi::EWriteMenu, NULL, sendingCapabilities, mtmFilter ); @@ -1338,7 +1291,7 @@ else if ( itemType == CItemFinder::EEmailAddress && ( fieldInfo->FieldId() == EPbkFieldIdEmailAddress || #ifdef __VOIP - iFindItemVoIPExtension->IsVoIPSupported() && + iFindItemVoIPExtension->IsVoIPSupported() && #else iVoIPFeatureSupported && #endif @@ -1597,18 +1550,6 @@ // sets call type for VoIP iDialData->SetCallType( CAiwDialData::EAIWVoiP ); } - else - { - // sets call type for call, as now only voice call - // exists in menu now. - iDialData->SetCallType( CAiwDialData::EAIWVoice ); - } - } - else - { - // sets call type for call, as now only voice call - // exists in menu now. - iDialData->SetCallType( CAiwDialData::EAIWVoice ); } #endif // RD_VOIP_REL_2_2 iDialData->SetPhoneNumberL( numberPtr );