photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp
branchRCL_3
changeset 27 34937ec34dac
parent 26 5b3385a43d68
equal deleted inserted replaced
26:5b3385a43d68 27:34937ec34dac
   631     iPreviewTNBinding->StopTimer();
   631     iPreviewTNBinding->StopTimer();
   632 
   632 
   633     if (iMediaList->FocusIndex() != EGlxListItemAll || iMediaList->IdSpaceId(
   633     if (iMediaList->FocusIndex() != EGlxListItemAll || iMediaList->IdSpaceId(
   634             0) != KGlxIdSpaceIdRoot)
   634             0) != KGlxIdSpaceIdRoot)
   635         {
   635         {
       
   636         // Delete the bitmap; otherwise this memory will be leaked
       
   637         if (aBitmap)
       
   638             {
       
   639             delete aBitmap;
       
   640             aBitmap = NULL;
       
   641             }
   636         GLX_LOG_INFO("CGlxListViewImp::PreviewTNReadyL()- Ignore!");
   642         GLX_LOG_INFO("CGlxListViewImp::PreviewTNReadyL()- Ignore!");
   637         return;
   643         return;
   638         }
   644         }
   639 
   645 
   640     if (aBitmap)
   646     if (aBitmap)
   714             GLX_DEBUG1("CGlxListViewImp::CreateListL() - SetEmptyTextL()");			
   720             GLX_DEBUG1("CGlxListViewImp::CreateListL() - SetEmptyTextL()");			
   715             //set the text to be shown if the list is empty.
   721             //set the text to be shown if the list is empty.
   716             HBufC* emptyText = StringLoader::LoadLC(R_LIST_EMPTY_VIEW_TEXT); 
   722             HBufC* emptyText = StringLoader::LoadLC(R_LIST_EMPTY_VIEW_TEXT); 
   717             iList->SetEmptyTextL(*emptyText);
   723             iList->SetEmptyTextL(*emptyText);
   718             CleanupStack::PopAndDestroy(emptyText);
   724             CleanupStack::PopAndDestroy(emptyText);
   719             
       
   720             //While coming back to main listview
       
   721             TGlxIdSpaceId id = iMediaList->IdSpaceId(0);
       
   722             if((id == KGlxIdSpaceIdRoot) && (mediaCount > 0))
       
   723                 {            
       
   724                 for (TInt i = 0; i < mediaCount; i++)
       
   725                     {
       
   726                     SetDefaultThumbnailL(i);
       
   727                     }
       
   728                 }            
       
   729             }		
   725             }		
   730         
   726         
   731 		//Fix for ESLM-7SAHPT::Clear Flag to Disable QWERTY search input in list view
   727 		//Fix for ESLM-7SAHPT::Clear Flag to Disable QWERTY search input in list view
   732 		iList->ClearFlags(CHgScroller::EHgScrollerSearchWithQWERTY ); 
   728 		iList->ClearFlags(CHgScroller::EHgScrollerSearchWithQWERTY ); 
   733 		
   729 		
   741 		AppUi()->AddToStackL(iList);
   737 		AppUi()->AddToStackL(iList);
   742 		}
   738 		}
   743 		
   739 		
   744 	if (mediaCount)
   740 	if (mediaCount)
   745 	    {
   741 	    {
       
   742         TGlxIdSpaceId id = iMediaList->IdSpaceId(0);
       
   743 
   746 		for (TInt i=0; i<mediaCount; i++)
   744 		for (TInt i=0; i<mediaCount; i++)
   747 			{
   745 			{
   748 		   	const TGlxMedia& item = iMediaList->Item(i);
   746 		   	const TGlxMedia& item = iMediaList->Item(i);
   749 			iList->ItemL(i).SetTitleL(item.Title());
   747 			iList->ItemL(i).SetTitleL(item.Title());
   750 			iList->ItemL(i).SetTextL(item.SubTitle());
   748 			iList->ItemL(i).SetTextL(item.SubTitle());
       
   749             // Set the default TNs for the main listview
       
   750             if (id == KGlxIdSpaceIdRoot)
       
   751                 {
       
   752                 SetDefaultThumbnailL(i);
       
   753                 }
   751 			}
   754 			}
   752 		GLX_DEBUG3("CGlxListViewImp::CreateListL() Medialist Count = %d, "
   755 		GLX_DEBUG3("CGlxListViewImp::CreateListL() Medialist Count = %d, "
   753 		        "iLastFocusIndex %d",mediaCount,iLastFocusedIndex);
   756 		        "iLastFocusIndex %d",mediaCount,iLastFocusedIndex);
   754         if(iLastFocusedIndex >= mediaCount)
   757         if(iLastFocusedIndex >= mediaCount)
   755             {
   758             {
  1165 
  1168 
  1166         if (aForeground)
  1169         if (aForeground)
  1167             {
  1170             {
  1168             iProgressIndicator->ShowProgressbarL();
  1171             iProgressIndicator->ShowProgressbarL();
  1169             }
  1172             }
  1170         else
       
  1171             {
       
  1172             iProgressIndicator->DismissProgressDialog();
       
  1173             }
       
  1174         }
  1173         }
  1175     }
  1174     }
  1176 
  1175 
  1177 // ---------------------------------------------------------------------------
  1176 // ---------------------------------------------------------------------------
  1178 // NavigateToMainListL
  1177 // NavigateToMainListL