commonuis/CommonUi/src/FindItemDialog.cpp
branchRCL_3
changeset 18 fcdfafb36fe7
parent 17 a1caeb42b3a3
child 19 aecbbf00d063
--- a/commonuis/CommonUi/src/FindItemDialog.cpp	Thu Jul 15 18:56:19 2010 +0300
+++ b/commonuis/CommonUi/src/FindItemDialog.cpp	Thu Aug 19 10:11:06 2010 +0300
@@ -991,10 +991,42 @@
             }
         // Phone number cmds
         case EFindItemCmdCall:
-            { // bit awkward but correct functionality provided.
-            TKeyEvent keyEvent;
-            keyEvent.iCode = EKeyPhoneSend;
-            OfferKeyEventL( keyEvent, EEventKey );
+            {
+            if ( !iHideCallSubMenu )
+                { // bit awkward but correct functionality provided.
+                TKeyEvent keyEvent;
+                keyEvent.iCode = EKeyPhoneSend;
+                OfferKeyEventL( keyEvent, EEventKey );
+                }
+            else
+                {
+                if ( !iDialData )
+                    {
+                    break;
+                    }
+                FormatDialDataL( aCommandId );
+
+                CAiwGenericParamList& paramList =
+                    iServiceHandler->InParamListL();
+
+                if ( iFindItemVoIPExtension->VoIPProfilesExistL() &&
+                    ( iSearchCase ==
+                    CFindItemEngine::EFindItemSearchMailAddressBin ||
+                    iSearchCase == KSearchTelInternetNumber ) )
+                    {
+                    //voip
+                    iDialData->SetCallType( CAiwDialData::EAIWVoiP );
+                    }
+
+                iDialData->FillInParamListL( paramList );
+
+                iServiceHandler->ExecuteServiceCmdL(
+                    KAiwCmdCall,
+                    paramList,
+                    iServiceHandler->OutParamListL(),
+                    0, // No options used.
+                    NULL ); // Dial results are not wanted.
+                }
             break;
             }
         // fix for FAMZ-7JVQ4Y
@@ -1277,7 +1309,7 @@
             }
         else if (
             iSearchCase & CFindItemEngine::EFindItemSearchPhoneNumberBin &&
-            !iHideCallMenu )
+            !iHideCallMenu && !iHideCallSubMenu )
             {
             aMenuPane->SetItemDimmed( EFindItemCmdCall, ETrue );
             aMenuPane->AddMenuItemsL(
@@ -1341,6 +1373,18 @@
         }
     }
 
+
+// -----------------------------------------------------------------------------
+// CFindItemDialog::SetCallSubMenuVisibility
+// Sets AIW submenu visibility
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CFindItemDialog::SetCallSubMenuVisibility( TBool aVisible )
+    {
+    iHideCallSubMenu = !aVisible;
+    }
+
+
 // -----------------------------------------------------------------------------
 // CFindItemDialog::OfferKeyEventL
 //  Handles key events