equal
deleted
inserted
replaced
590 { |
590 { |
591 PSLN_TRACE_DEBUG("CPslnGeneralThemeContainer::HandleIdleTimeL" ); |
591 PSLN_TRACE_DEBUG("CPslnGeneralThemeContainer::HandleIdleTimeL" ); |
592 // First stop timer. |
592 // First stop timer. |
593 iPreviewIdle->Cancel(); |
593 iPreviewIdle->Cancel(); |
594 |
594 |
|
595 // No re-preview the same theme |
|
596 if( iActiveSkinItemIndex == iListBox->CurrentItemIndex() ) |
|
597 { |
|
598 return; |
|
599 } |
595 |
600 |
596 // Check free mem |
601 // Check free mem |
597 TInt freeMem = 0; |
602 TInt freeMem = 0; |
598 HAL::Get( HALData::EMemoryRAMFree , freeMem ); |
603 HAL::Get( HALData::EMemoryRAMFree , freeMem ); |
599 if( freeMem <= KPslnMinMemSize ) |
604 if( freeMem <= KPslnMinMemSize ) |
605 errorNote->ShowNoteL( EAknGlobalErrorNote, *errorBuf ); |
610 errorNote->ShowNoteL( EAknGlobalErrorNote, *errorBuf ); |
606 CleanupStack::PopAndDestroy( 2 ); // errorNote & errorBuf |
611 CleanupStack::PopAndDestroy( 2 ); // errorNote & errorBuf |
607 return; |
612 return; |
608 } |
613 } |
609 |
614 |
|
615 iActiveSkinItemIndex = iListBox->CurrentItemIndex(); |
610 // Ignore download skin item if it is available. |
616 // Ignore download skin item if it is available. |
611 TInt modifier = IsEmbeddedLinkVisible(); |
617 TInt modifier = IsEmbeddedLinkVisible(); |
612 TInt activeSkinIndex = iListBox->CurrentItemIndex() - modifier; |
618 TInt activeSkinIndex = iActiveSkinItemIndex - modifier; |
613 |
619 |
614 TBool usbAttached = static_cast<CPslnUi*>( ControlEnv()->AppUi() )->USBAttachState(); |
620 TBool usbAttached = static_cast<CPslnUi*>( ControlEnv()->AppUi() )->USBAttachState(); |
615 |
621 |
616 iActiveSkinItemIndex = iListBox->CurrentItemIndex(); |
|
617 if( iModel->IsValidForPreview(activeSkinIndex) == EFalse ) |
622 if( iModel->IsValidForPreview(activeSkinIndex) == EFalse ) |
618 { |
623 { |
619 // If skin file didn't valid, preview active skin. |
624 // If skin file didn't valid, preview active skin. |
620 activeSkinIndex = iModel->ActiveSkinIndex(); |
625 activeSkinIndex = iModel->ActiveSkinIndex(); |
621 } |
626 } |