photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp
branchRCL_3
changeset 23 b023a8d2866a
parent 19 420f6808bf21
child 24 ea65f74e6de4
equal deleted inserted replaced
21:f9e827349359 23:b023a8d2866a
   567 
   567 
   568 void CGlxListViewImp::HandleOpenL( TInt aIndex )
   568 void CGlxListViewImp::HandleOpenL( TInt aIndex )
   569     {
   569     {
   570     TRACER("CGlxListViewImp::HandleOpenL");
   570     TRACER("CGlxListViewImp::HandleOpenL");
   571     
   571     
   572     GLX_LOG_INFO1("CGlxListViewImp RProperty::Get leftVariable %d",(iUiUtility->GetItemsLeftCount()));
   572     GLX_LOG_INFO1("CGlxListViewImp RProperty::Get leftVariable %d",
   573 
   573             (iUiUtility->GetItemsLeftCount()));
   574     if (iUiUtility->GetItemsLeftCount())
   574 
   575         {
   575     if ((iUiUtility->GetItemsLeftCount() == KErrNotReady)
   576         if(!iProgressIndicator)
   576             || (iUiUtility->GetItemsLeftCount()))
       
   577         {
       
   578         if (!iProgressIndicator)
   577             {
   579             {
   578             iProgressIndicator = CGlxProgressIndicator::NewL(*this);
   580             iProgressIndicator = CGlxProgressIndicator::NewL(*this);
   579             }
   581             }
   580         iProgressIndicator->ShowProgressbarL();
   582         iProgressIndicator->ShowProgressbarL();
   581         if(iSchedulerWait)
   583         if (iSchedulerWait)
   582             {
   584             {
   583             delete iSchedulerWait;
   585             delete iSchedulerWait;
   584             iSchedulerWait = NULL;
   586             iSchedulerWait = NULL;
   585             }
   587             }
   586         iSchedulerWait = new (ELeave) CActiveSchedulerWait();
   588         iSchedulerWait = new (ELeave) CActiveSchedulerWait();
  1116 // ---------------------------------------------------------------------------
  1118 // ---------------------------------------------------------------------------
  1117 void CGlxListViewImp::HandleMMCInsertionL()
  1119 void CGlxListViewImp::HandleMMCInsertionL()
  1118     {
  1120     {
  1119     TRACER("CGlxListViewImp::HandleMMCInsertionL()");
  1121     TRACER("CGlxListViewImp::HandleMMCInsertionL()");
  1120     iMMCState = ETrue;
  1122     iMMCState = ETrue;
  1121     NavigateToMainListL();
  1123     // Set PS key value to KErrNotRready as TNM takes some
       
  1124     // time to write the value.Will be overwritten by TNM later.
       
  1125     iUiUtility->SetTNMDaemonPSKeyvalue();
       
  1126 	NavigateToMainListL();
  1122     }
  1127     }
  1123 
  1128 
  1124 // ---------------------------------------------------------------------------
  1129 // ---------------------------------------------------------------------------
  1125 // HandleMMCRemovalL
  1130 // HandleMMCRemovalL
  1126 // 
  1131 // 
  1139 // 
  1144 // 
  1140 // ---------------------------------------------------------------------------
  1145 // ---------------------------------------------------------------------------
  1141 void CGlxListViewImp::HandleForegroundEventL(TBool aForeground)
  1146 void CGlxListViewImp::HandleForegroundEventL(TBool aForeground)
  1142     {
  1147     {
  1143     TRACER("CGlxListViewImp::HandleForegroundEventL()");
  1148     TRACER("CGlxListViewImp::HandleForegroundEventL()");
       
  1149     GLX_DEBUG2("CGlxListViewImp::HandleForegroundEventL(%d)", aForeground);
  1144     CAknView::HandleForegroundEventL(aForeground);
  1150     CAknView::HandleForegroundEventL(aForeground);
  1145     if(iMMCState)
  1151     if (iMMCState)
  1146         {
  1152         {
  1147         iMMCState = EFalse;
  1153         iMMCState = EFalse;
  1148         NavigateToMainListL();
  1154         NavigateToMainListL();
  1149         }
  1155         }
  1150 
  1156 
  1151     if (iProgressIndicator)
  1157     TInt leftCount = iUiUtility->GetItemsLeftCount();
  1152         {
  1158     if (iProgressIndicator && (leftCount == KErrNotReady || leftCount))
  1153         iProgressIndicator->ControlTNDaemon(aForeground);
  1159         {
       
  1160         if (!iUiUtility->GetKeyguardStatus())
       
  1161             {
       
  1162             iProgressIndicator->ControlTNDaemon(aForeground);
       
  1163             }
       
  1164 
  1154         if (aForeground)
  1165         if (aForeground)
  1155             {
  1166             {
  1156             iProgressIndicator->ShowProgressbarL();
  1167             iProgressIndicator->ShowProgressbarL();
  1157             }
  1168             }
  1158         else
  1169         else