psln/Src/PslnMainViewContainer.cpp
branchRCL_3
changeset 8 71dd06cfe933
parent 0 2f259fa3e83a
equal deleted inserted replaced
7:08e69e956a8c 8:71dd06cfe933
   237     CleanupStack::Pop( item );
   237     CleanupStack::Pop( item );
   238     item = reallocItem;
   238     item = reallocItem;
   239     CleanupStack::PushL( item );
   239     CleanupStack::PushL( item );
   240     reallocItem = NULL; // do not use anymore.
   240     reallocItem = NULL; // do not use anymore.
   241     TPtr ptr = item->Des();
   241     TPtr ptr = item->Des();
       
   242 
       
   243     TInt wallpaperOffset = 0;
       
   244     if ( aIndex == KPslnScreenSaverId 
       
   245 	    && !iPslnUi->ViewSupport().IsSet( CPslnUi::EPslnWallpaperView ) )
       
   246         {
       
   247         wallpaperOffset = 1;
       
   248         }
   242     if ( aOffset != KErrNotFound )
   249     if ( aOffset != KErrNotFound )
   243         {
   250         {
   244         iItemArray->InsertL( aIndex + aOffset, ptr );
   251         iItemArray->InsertL( aIndex + aOffset - wallpaperOffset, ptr );
   245         }
   252         }
   246     else
   253     else
   247         {
   254         {
   248         iItemArray->InsertL( aIndex, ptr );
   255         iItemArray->InsertL( aIndex - wallpaperOffset, ptr );
   249         }
   256         }
   250     CleanupStack::PopAndDestroy( item );
   257     CleanupStack::PopAndDestroy( item );
   251     PSLN_TRACE_DEBUG("CPslnMainViewContainer::MakeItemL END");
   258     PSLN_TRACE_DEBUG("CPslnMainViewContainer::MakeItemL END");
   252     }
   259     }
   253 
   260