browserui/browser/FavouritesSrc/BrowserAdaptiveListPopup.cpp
changeset 10 57d5b8e231c4
parent 0 84ad3b177aa3
child 18 4530440261a8
equal deleted inserted replaced
0:84ad3b177aa3 10:57d5b8e231c4
   204 
   204 
   205 // ---------------------------------------------------------
   205 // ---------------------------------------------------------
   206 // CBrowserAdaptiveListPopup::CBrowserAdaptiveListPopup()
   206 // CBrowserAdaptiveListPopup::CBrowserAdaptiveListPopup()
   207 // ---------------------------------------------------------
   207 // ---------------------------------------------------------
   208 //
   208 //
   209 CBrowserAdaptiveListPopup::CBrowserAdaptiveListPopup( CEikEdwin* aGotoPaneEdit, CCoeControl* aParent, TParentType aParentType):
   209 CBrowserAdaptiveListPopup::CBrowserAdaptiveListPopup( CEikEdwin* aGotoPaneEdit, 
   210     iEditor( aGotoPaneEdit ), iParent( aParent ), iParentType( aParentType )
   210         CCoeControl* aParent, TParentType aParentType, TBool aSearchFeature): 
       
   211         iEditor( aGotoPaneEdit ), iParent( aParent ),
       
   212         iParentType( aParentType ), iSearchFeature( aSearchFeature )
   211     {
   213     {
   212     iTouchSupported = AknLayoutUtils::PenEnabled();
   214     iTouchSupported = AknLayoutUtils::PenEnabled();
   213     }
   215     }
   214 
   216 
   215 // ---------------------------------------------------------
   217 // ---------------------------------------------------------
   765                     iFirstGotoContent = KNullDesC().AllocL();
   767                     iFirstGotoContent = KNullDesC().AllocL();
   766                     }
   768                     }
   767                 }
   769                 }
   768             else
   770             else
   769                 {
   771                 {
       
   772                 if(  iSearchFeature )
       
   773                     {
       
   774                     if( iList->CurrentItemIndex() == 0 )
       
   775                         {
       
   776                         resp = EKeyWasConsumed;
       
   777                         return resp;
       
   778                         }
       
   779                     }
   770                 resp=iList->OfferKeyEventL( aKeyEvent, aType );
   780                 resp=iList->OfferKeyEventL( aKeyEvent, aType );
   771                 }
   781                 }
   772             if ( currIndex > -1 )
   782             if ( currIndex > -1 )
   773                 {
   783                 {
   774                 //copy the selected item to edit field
   784                 //copy the selected item to edit field
   837                   || aKeyEvent.iCode == EKeyDownArrow        // South
   847                   || aKeyEvent.iCode == EKeyDownArrow        // South
   838                   || aKeyEvent.iCode == EKeyRightDownArrow   // Southeast
   848                   || aKeyEvent.iCode == EKeyRightDownArrow   // Southeast
   839                   || aKeyEvent.iCode == EStdKeyDevice12 )    //   : Extra KeyEvent supports diagonal event simulator wedge
   849                   || aKeyEvent.iCode == EStdKeyDevice12 )    //   : Extra KeyEvent supports diagonal event simulator wedge
   840             {
   850             {
   841             resp = EKeyWasConsumed;
   851             resp = EKeyWasConsumed;
       
   852             if(  iSearchFeature )
       
   853                 {
       
   854                 if ( iPrevItem <= 0 )
       
   855                     {
       
   856                     if(! iList->HighLightEnabled() )
       
   857                         {
       
   858                         resp = EKeyWasNotConsumed;
       
   859                         return resp;
       
   860                         }
       
   861                     }
       
   862                 }
   842             //it was the last item
   863             //it was the last item
   843             if ( iPrevItem == 0 )
   864             if ( iPrevItem == 0 )
   844                 {
   865                 {
   845                 //write back the original string
   866                 //write back the original string
   846                 iList->SetHighLight( EFalse );
   867                 iList->SetHighLight( EFalse );
  1137         }
  1158         }
  1138     TBuf<KMaxFileName> iconFile= fp->FullName();
  1159     TBuf<KMaxFileName> iconFile= fp->FullName();
  1139     CleanupStack::PopAndDestroy(fp);
  1160     CleanupStack::PopAndDestroy(fp);
  1140 
  1161 
  1141     MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
  1162     MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
  1142     AknsUtils::CreateIconL( skinInstance,
  1163     AknsUtils::CreateIconLC( skinInstance,
  1143                                            KAknsIIDQgnPropWmlFolderAdap,
  1164                                            KAknsIIDQgnPropWmlFolderAdap,
  1144                                            newIconBmp,
  1165                                            newIconBmp,
  1145                                            newIconMaskBmp,
  1166                                            newIconMaskBmp,
  1146                                            iconFile,
  1167                                            iconFile,
  1147                                            EMbmBrowserQgn_prop_wml_folder_adap,
  1168                                            EMbmBrowserQgn_prop_wml_folder_adap,
  1148                                            EMbmBrowserQgn_prop_wml_folder_adap_mask);
  1169                                            EMbmBrowserQgn_prop_wml_folder_adap_mask);
  1149     newIcon = CGulIcon::NewL( newIconBmp, newIconMaskBmp);
  1170     newIcon = CGulIcon::NewL( newIconBmp, newIconMaskBmp);
       
  1171     CleanupStack::Pop(2);
  1150     CleanupStack::PushL(newIcon);
  1172     CleanupStack::PushL(newIcon);
  1151     icons->AppendL( newIcon );
  1173     icons->AppendL( newIcon );
  1152     CleanupStack::Pop(newIcon);
  1174     CleanupStack::Pop(newIcon);
  1153     AknsUtils::CreateIconL( skinInstance,
  1175     AknsUtils::CreateIconLC( skinInstance,
  1154                                            KAknsIIDQgnPropWmlBmAdap,
  1176                                            KAknsIIDQgnPropWmlBmAdap,
  1155                                            newIconBmp,
  1177                                            newIconBmp,
  1156                                            newIconMaskBmp,
  1178                                            newIconMaskBmp,
  1157                                            iconFile,
  1179                                            iconFile,
  1158                                            EMbmBrowserQgn_prop_wml_bm_adap,
  1180                                            EMbmBrowserQgn_prop_wml_bm_adap,
  1159                                            EMbmBrowserQgn_prop_wml_bm_adap_mask);
  1181                                            EMbmBrowserQgn_prop_wml_bm_adap_mask);
  1160     newIcon = CGulIcon::NewL( newIconBmp, newIconMaskBmp);
  1182     newIcon = CGulIcon::NewL( newIconBmp, newIconMaskBmp);
       
  1183     CleanupStack::Pop(2);
  1161     CleanupStack::PushL(newIcon);
  1184     CleanupStack::PushL(newIcon);
  1162     icons->AppendL( newIcon );
  1185     icons->AppendL( newIcon );
  1163     CleanupStack::Pop(newIcon);
  1186     CleanupStack::Pop(newIcon);
  1164     iList->ItemDrawer()->FormattedCellData()->SetIconArrayL(icons);
  1187     iList->ItemDrawer()->FormattedCellData()->SetIconArrayL(icons);
  1165     CleanupStack::Pop();    // POP Icon
  1188     CleanupStack::Pop();    // POP Icon