equal
deleted
inserted
replaced
268 iRecentUrlStore = CBrowserAppUi::Static()->RecentUrlStore(); |
268 iRecentUrlStore = CBrowserAppUi::Static()->RecentUrlStore(); |
269 if (!iRecentUrlStore) |
269 if (!iRecentUrlStore) |
270 { |
270 { |
271 User::Leave(KErrCouldNotConnect); |
271 User::Leave(KErrCouldNotConnect); |
272 } |
272 } |
273 |
273 iListScrollTimer = CPeriodic::NewL(CActive::EPriorityIdle); |
274 } |
274 } |
275 |
275 |
276 // --------------------------------------------------------- |
276 // --------------------------------------------------------- |
277 // CBrowserAdaptiveListPopup::~CBrowserAdaptiveListPopup() |
277 // CBrowserAdaptiveListPopup::~CBrowserAdaptiveListPopup() |
278 // Destructor |
278 // Destructor |
283 delete iItems; |
283 delete iItems; |
284 delete iItemNames; |
284 delete iItemNames; |
285 delete iItemNamesToShow; |
285 delete iItemNamesToShow; |
286 delete iPrevGotoContent; |
286 delete iPrevGotoContent; |
287 delete iFirstGotoContent; |
287 delete iFirstGotoContent; |
|
288 if(iListScrollTimer) |
|
289 { |
|
290 iListScrollTimer->Cancel(); |
|
291 delete iListScrollTimer; |
|
292 } |
288 } |
293 } |
289 |
294 |
290 // --------------------------------------------------------- |
295 // --------------------------------------------------------- |
291 // CBrowserAdaptiveListPopup::SetOrdinalPosition |
296 // CBrowserAdaptiveListPopup::SetOrdinalPosition |
292 // --------------------------------------------------------- |
297 // --------------------------------------------------------- |
634 { |
639 { |
635 // this scrolls list to the correct position, probably still does too much work |
640 // this scrolls list to the correct position, probably still does too much work |
636 AknListBoxLayouts::SetupListboxPos( *iList, AppLayout::list_single_graphic_popup_wml_pane( 0 )); |
641 AknListBoxLayouts::SetupListboxPos( *iList, AppLayout::list_single_graphic_popup_wml_pane( 0 )); |
637 } |
642 } |
638 //the last item is visible |
643 //the last item is visible |
639 iList->ScrollToMakeItemVisible( iList->Model()->NumberOfItems()-1 ); |
644 //ScrollToMakeItemVisible scrolls only after some delay |
|
645 if(!iListScrollTimer->IsActive()) |
|
646 { |
|
647 iListScrollTimer->Start(20, 0, |
|
648 TCallBack(ListScrollTimerCallBack, this)); |
|
649 } |
|
650 |
640 #ifdef BRDO_TOUCH_ENABLED_FF |
651 #ifdef BRDO_TOUCH_ENABLED_FF |
641 const CFont* pFont = AknLayoutUtils::FontFromId(EAknLogicalFontPrimaryFont); |
652 const CFont* pFont = AknLayoutUtils::FontFromId(EAknLogicalFontPrimaryFont); |
642 TFontSpec fontSpec = pFont->FontSpecInTwips(); |
653 TFontSpec fontSpec = pFont->FontSpecInTwips(); |
643 fontSpec.iHeight =KFontHeight; |
654 fontSpec.iHeight =KFontHeight; |
644 |
655 |
1291 void CBrowserAdaptiveListPopup::SetMaxRecentUrls (TInt maxRecentUrls) |
1302 void CBrowserAdaptiveListPopup::SetMaxRecentUrls (TInt maxRecentUrls) |
1292 { |
1303 { |
1293 iMaxRecentUrlsToShow = maxRecentUrls; |
1304 iMaxRecentUrlsToShow = maxRecentUrls; |
1294 } |
1305 } |
1295 |
1306 |
|
1307 TInt CBrowserAdaptiveListPopup::ListScrollTimerCallBack(TAny* aAny) |
|
1308 { |
|
1309 CBrowserAdaptiveListPopup* self = static_cast<CBrowserAdaptiveListPopup*>( aAny ); |
|
1310 self->DoListScrolling(); |
|
1311 self->iListScrollTimer->Cancel(); |
|
1312 return KErrNone; |
|
1313 } |
|
1314 |
|
1315 void CBrowserAdaptiveListPopup::DoListScrolling() |
|
1316 { |
|
1317 iList->ScrollToMakeItemVisible( iList->Model()->NumberOfItems()-1 ); |
|
1318 } |
1296 |
1319 |
1297 // End of File |
1320 // End of File |