fep/aknfep/src/AknFepUiInputStatePredictiveCandidateMiniQwertyChinesePhrase.cpp
branchRCL_3
changeset 56 8152b1f1763a
parent 50 5a1685599b76
--- a/fep/aknfep/src/AknFepUiInputStatePredictiveCandidateMiniQwertyChinesePhrase.cpp	Wed Sep 15 12:34:44 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStatePredictiveCandidateMiniQwertyChinesePhrase.cpp	Wed Oct 13 14:55:58 2010 +0300
@@ -151,27 +151,7 @@
                 fepMan->NewTextL(text);
                 fepMan->CommitInlineEditL();
                 iOwner->PtiEngine()->SetPredictiveChineseChar(text);
-                
-                // For sogou core, the predictive is not endless, so when there
-                // is no predictive candidates, we should call TryCloseUiL().
-                TBool noCandidates = EFalse;
-                
-                if ( iPlugin.IsEnable() || iStrokePlugin.IsEnable())
-                    {
-                    // Get the predictive candidates.
-                    CDesCArrayFlat* phraseCandidates = new(ELeave) CDesCArrayFlat(1);
-                    CleanupStack::PushL ( phraseCandidates );
-                    phraseCandidates->Reset();
-                    iOwner->PtiEngine()->GetChinesePhraseCandidatesL( *phraseCandidates );
-                    if ( phraseCandidates->Count() == 0 )
-                        {
-                        noCandidates = ETrue;
-                        }
-                    CleanupStack::PopAndDestroy( phraseCandidates );
-                    }
-                
-                // If no candidates, call TryCloseUiL().
-                if ( fepMan->IsFlagSet(CAknFepManager::EFlagEditorFull) || noCandidates )
+                if (fepMan->IsFlagSet(CAknFepManager::EFlagEditorFull))
                     {
                     fepMan->ClearFlag(CAknFepManager::EFlagEditorFull);
                     iOwner->FepMan()->TryCloseUiL();
@@ -185,11 +165,13 @@
         }
     else if(aKey == EStdKeyRightArrow )
         {
+    	iOwner->ChangeState(EPredictiveInput);  
     	UIContainer()->CandidatePane()->SelectNext(); 
         }
     else if (aKey == EStdKeyLeftArrow)  
     	{
-        UIContainer()->CandidatePane()->SelectPrev();
+    	iOwner->ChangeState(EPredictiveInput);  
+        UIContainer()->CandidatePane()->SelectLastPhrase();
     	}    
     else if(iOwner->IsValidChineseInputKeyQwerty(aKey))
         {
@@ -299,47 +281,4 @@
             break;
         }
     }
-void TAknFepInputStatePredictiveCandidateMiniQwertyChinesePhrase::SubmitTextL( const TDesC& aText )
-	{
-	if( aText.Length())
-	    {            
-	    MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
-	    CPtiEngine* engine = iOwner->PtiEngine();
-	    fepMan->NewTextL(aText);
-	    fepMan->CommitInlineEditL();
-	    engine->SetPredictiveChineseChar(aText);
-	                    
-        // For sogou core, the predictive is not endless, so when there
-        // is no predictive candidates, we should call TryCloseUiL().
-        TBool noCandidates = EFalse;
-        
-        if ( iPlugin.IsEnable() || iStrokePlugin.IsEnable())
-            {
-            // Get the predictive candidates.
-            CDesCArrayFlat* phraseCandidates = new(ELeave) CDesCArrayFlat(1);
-            CleanupStack::PushL ( phraseCandidates );
-            phraseCandidates->Reset();
-            iOwner->PtiEngine()->GetChinesePhraseCandidatesL( *phraseCandidates );
-            if ( phraseCandidates->Count() == 0 )
-                {
-                noCandidates = ETrue;
-                }
-            CleanupStack::PopAndDestroy( phraseCandidates );
-            }
-	    
-	    if (fepMan->IsFlagSet(CAknFepManager::EFlagEditorFull) || noCandidates )
-	       {
-	        fepMan->ClearFlag(CAknFepManager::EFlagEditorFull);
-	        fepMan->TryCloseUiL();
-	        }
-	    else
-	        {
-	    if( iOwner )
-	    	{
-	        iOwner->ChangeState(EPredictiveCandidate);
-	    	}
-	        }           
-	    }
-	}
-
 // End of file