161 for (TInt i = aStartIndex; i <= aEndIndex; i++) |
161 for (TInt i = aStartIndex; i <= aEndIndex; i++) |
162 { |
162 { |
163 iHgGrid->InsertItem(CHgItem::NewL(), i); |
163 iHgGrid->InsertItem(CHgItem::NewL(), i); |
164 } |
164 } |
165 } |
165 } |
166 |
|
167 // Setting the initial focus for all grid views except downloads, |
|
168 // for downloads it is already set. |
|
169 TInt focusIndex = aList->FocusIndex(); |
|
170 iHgGrid->SetSelectedIndex(focusIndex); |
|
171 } |
166 } |
172 |
167 |
173 // ---------------------------------------------------------------------------- |
168 // ---------------------------------------------------------------------------- |
174 // HandleItemRemoved |
169 // HandleItemRemoved |
175 // ---------------------------------------------------------------------------- |
170 // ---------------------------------------------------------------------------- |
282 // ---------------------------------------------------------------------------- |
277 // ---------------------------------------------------------------------------- |
283 // HandleFocusChangedL |
278 // HandleFocusChangedL |
284 // ---------------------------------------------------------------------------- |
279 // ---------------------------------------------------------------------------- |
285 // |
280 // |
286 void CGlxGridViewMLObserver::HandleFocusChangedL( NGlxListDefs:: |
281 void CGlxGridViewMLObserver::HandleFocusChangedL( NGlxListDefs:: |
287 TFocusChangeType /*aType*/, TInt aNewIndex, TInt /*aOldIndex*/, |
282 TFocusChangeType /*aType*/, TInt aNewIndex, TInt aOldIndex, |
288 MGlxMediaList* /*aList*/ ) |
283 MGlxMediaList* /*aList*/ ) |
289 { |
284 { |
290 TRACER("CGlxGridViewMLObserver::HandleFocusChangedL()"); |
285 TRACER("CGlxGridViewMLObserver::HandleFocusChangedL()"); |
291 iHgGrid->SetSelectedIndex(aNewIndex); |
286 if (aOldIndex != KErrNotFound) |
292 iHgGrid->RefreshScreen(aNewIndex); |
287 { |
|
288 iHgGrid->SetSelectedIndex(aNewIndex); |
|
289 iHgGrid->RefreshScreen(aNewIndex); |
|
290 } |
293 /* if (aList->Count()) |
291 /* if (aList->Count()) |
294 { |
292 { |
295 // This us to set the context to HG Teleport |
293 // This us to set the context to HG Teleport |
296 TGlxMedia item = iMediaList.Item( aNewIndex ); |
294 TGlxMedia item = iMediaList.Item( aNewIndex ); |
297 iContextUtility->PublishPhotoContextL(item.Uri()); |
295 iContextUtility->PublishPhotoContextL(item.Uri()); |