diff -r aba6b8104af3 -r 51c0f5edf5ef appinstaller/AppMngr2/src/appmngr2listcontainer.cpp --- a/appinstaller/AppMngr2/src/appmngr2listcontainer.cpp Tue Feb 02 00:20:15 2010 +0200 +++ b/appinstaller/AppMngr2/src/appmngr2listcontainer.cpp Fri Feb 19 22:57:02 2010 +0200 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -64,7 +64,7 @@ TKeyResponse CAppMngr2ListContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ) { - TKeyResponse response = iListBox->OfferKeyEventL( aKeyEvent, aType ); + TKeyResponse response = iListBox->OfferKeyEventL( aKeyEvent, aType ); if( aKeyEvent.iCode == EKeyUpArrow || aKeyEvent.iCode == EKeyDownArrow ) { iView.UpdateMiddleSoftkeyCommandL(); @@ -178,8 +178,9 @@ void CAppMngr2ListContainer::RefreshL( TBool aPreserveSelectedItem, TBool& aSelectedItemChanged, TInt aMoreRefreshesExpected ) { - FLOG( "CAppMngr2ListContainer::RefreshL( %d )", aPreserveSelectedItem ); - + FLOG( "CAppMngr2ListContainer::RefreshL( %d %d %d ) begin", + aPreserveSelectedItem, aSelectedItemChanged, aMoreRefreshesExpected ); + // Record the item text of the current item if selection must be preserved in // the current item. The item text is used to identify the item later, so that // it can be selected again. @@ -195,7 +196,7 @@ CreateItemArrayL(); // resets the item array PopulateItemArrayL(); // fills in new items iListBox->HandleItemAdditionL(); // re-calculates size and scrollbar - + // If selection must be preserved, search the item in new item array // and select it again. Make sure to delete itemText if it was allocated. TBool currentItemSet = EFalse; @@ -212,7 +213,7 @@ } CleanupStack::PopAndDestroy( itemText ); } - + // If item is not found (it may have been deleted), then tell to the // caller that the selected item was changed and select another item // from the same row number than the previously selected item. @@ -232,6 +233,8 @@ iListBox->SetCurrentItemIndex( currentItemIndex ); } } + + FLOG( "CAppMngr2ListContainer::RefreshL() end" ); } // --------------------------------------------------------------------------- @@ -246,19 +249,19 @@ iListBox->SetContainerWindowL( *this ); iListBox->ConstructL( this, EAknListBoxSelectionList ); iListBox->SetListBoxObserver( this ); - + // Dont display default "(no data)" empty text iListBox->View()->SetListEmptyTextL( KNullDesC ); LoadIconsL(); CreateItemArrayL(); PopulateItemArrayL(); - + iListBox->CreateScrollBarFrameL(); iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto ); iListBox->SetRect( aRect.Size() ); - + // Enable marquee effect iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue ); } @@ -311,10 +314,10 @@ void CAppMngr2ListContainer::PopulateItemArrayL() { FLOG( "CAppMngr2ListContainer::PopulateItemArrayL()" ); - + CArrayPtr* iconArray = iListBox->ItemDrawer()->ColumnData()->IconArray(); DeleteItemSpecificIcons( *iconArray ); - + TInt count = ItemCount(); for( TInt index = 0; index < count; index++ ) { @@ -329,10 +332,10 @@ TInt iconIndexMax; Model().GetIconIndexesL( appInfo.Runtime().RuntimeUid(), iconIndexBase, iconIndexMax ); - + // Get list icon index from plugin TInt iconIndex = appInfo.IconIndex(); - + // Convert index into the range of 0 .. (icons - 1) if( iconIndex == EAppMngr2UseSpecificIcon ) { @@ -366,7 +369,7 @@ iconIndex = EAppMngr2IconIndex_QgnPropUnknown; } } - // Sanity check - index must be in range, otherwise list panics + // Sanity check - index must be in range, otherwise list panics if( iconIndex < 0 || iconIndex >= iconArray->Count() ) { iconIndex = EAppMngr2IconIndex_QgnPropUnknown; @@ -374,7 +377,7 @@ // Get indicator icon index from plugin TInt indIconIndex = appInfo.IndicatorIconIndex(); - + // Convert indicator icon index into the range of 0 .. (icons-1) or // leave special value EAppMngr2NoIndicatorIcon in it if( indIconIndex == EAppMngr2UseSpecificIcon )