equal
deleted
inserted
replaced
355 |
355 |
356 TUint brCtlCapabilities = TBrCtlDefs::ECapabilityClientResolveEmbeddedURL | |
356 TUint brCtlCapabilities = TBrCtlDefs::ECapabilityClientResolveEmbeddedURL | |
357 TBrCtlDefs::ECapabilityDisplayScrollBar | |
357 TBrCtlDefs::ECapabilityDisplayScrollBar | |
358 TBrCtlDefs::ECapabilityClientNotifyURL | |
358 TBrCtlDefs::ECapabilityClientNotifyURL | |
359 TBrCtlDefs::ECapabilityLoadHttpFw | |
359 TBrCtlDefs::ECapabilityLoadHttpFw | |
360 TBrCtlDefs::ECapabilityCursorNavigation; |
360 TBrCtlDefs::ECapabilityCursorNavigation | |
|
361 TBrCtlDefs::ECapabilityPinchZoom; |
361 |
362 |
362 // Set browsercontrol to whole screen |
363 // Set browsercontrol to whole screen |
363 TRect rect( TPoint(), Size() ); |
364 TRect rect( TPoint(), Size() ); |
364 |
365 |
365 iBrCtlInterface = CreateBrowserControlL( |
366 iBrCtlInterface = CreateBrowserControlL( |
512 // --------------------------------------------------------------------------- |
513 // --------------------------------------------------------------------------- |
513 // Loads content from given mail message. |
514 // Loads content from given mail message. |
514 // --------------------------------------------------------------------------- |
515 // --------------------------------------------------------------------------- |
515 // |
516 // |
516 void CFsEmailUiHtmlViewerContainer::LoadContentFromMailMessageL( |
517 void CFsEmailUiHtmlViewerContainer::LoadContentFromMailMessageL( |
517 CFSMailMessage* aMailMessage, TBool aResetScrollPos ) |
518 CFSMailMessage* aMailMessage, TBool aResetScrollPos ) |
518 { |
519 { |
519 FUNC_LOG; |
520 FUNC_LOG; |
520 ASSERT( aMailMessage ); |
521 ASSERT( aMailMessage ); |
521 iMessage = aMailMessage; |
522 iMessage = aMailMessage; |
522 // Cancel any browser fetch operation, just in case the browser is still |
523 // Cancel any browser fetch operation, just in case the browser is still |
801 |
802 |
802 if ( !iMessageParts.Count() && iAppUi.DownloadInfoMediator() ) |
803 if ( !iMessageParts.Count() && iAppUi.DownloadInfoMediator() ) |
803 { |
804 { |
804 iAppUi.DownloadInfoMediator()->StopObserving( this ); |
805 iAppUi.DownloadInfoMediator()->StopObserving( this ); |
805 } |
806 } |
806 |
807 |
807 if ( iMessage && linkContent ) |
808 if ( iMessage && linkContent ) |
808 { |
809 { |
809 CFSMailMessagePart* part = iMessage->ChildPartL( aPart.iMessagePartId ); |
810 CFSMailMessagePart* part = iMessage->ChildPartL( aPart.iMessagePartId ); |
810 CleanupStack::PushL( part ); |
811 CleanupStack::PushL( part ); |
811 RFile contentFile = part->GetContentFileL(); |
812 RFile contentFile = part->GetContentFileL(); |
815 part->GetContentType(), KNullDesC(), content ); |
816 part->GetContentType(), KNullDesC(), content ); |
816 CleanupStack::PopAndDestroy( content ); |
817 CleanupStack::PopAndDestroy( content ); |
817 CleanupStack::PopAndDestroy( &contentFile ); |
818 CleanupStack::PopAndDestroy( &contentFile ); |
818 CleanupStack::PopAndDestroy( part ); |
819 CleanupStack::PopAndDestroy( part ); |
819 } |
820 } |
|
821 |
820 if ( iMessage ) |
822 if ( iMessage ) |
821 { |
823 { |
822 LoadContentFromMailMessageL( iMessage ); |
824 LoadContentFromMailMessageL( iMessage, EFalse ); |
823 |
|
824 UpdateOverlayButtons( ETrue ); |
825 UpdateOverlayButtons( ETrue ); |
825 } |
826 } |
826 } |
827 } |
827 else if ( aEvent.iProgressStatus == TFSProgress::EFSStatus_RequestCancelled || |
828 else if ( aEvent.iProgressStatus == TFSProgress::EFSStatus_RequestCancelled || |
828 aEvent.iProgressStatus < 0 ) |
829 aEvent.iProgressStatus < 0 ) |
1493 const TInt urlMaxLength = 2048; |
1494 const TInt urlMaxLength = 2048; |
1494 _LIT8( KHttp, "http://" ); |
1495 _LIT8( KHttp, "http://" ); |
1495 _LIT8( KHttps, "https://"); |
1496 _LIT8( KHttps, "https://"); |
1496 _LIT8( KWww, "www."); |
1497 _LIT8( KWww, "www."); |
1497 |
1498 |
1498 TBool eos( EFalse ); |
1499 TBool eos( aSource.Size() <= 0 ); |
1499 TInt position( 0 ); |
1500 TInt position( 0 ); |
1500 TInt carryOverInc( 0 ); |
1501 TInt carryOverInc( 0 ); |
1501 |
1502 |
1502 while ( !eos ) |
1503 while ( !eos ) |
1503 { |
1504 { |
1504 while ( carryOverInc >= aSource.Ptr( position ).Length() ) |
1505 while ( carryOverInc >= aSource.Ptr( position ).Length() && aSource.Size() != 0 ) |
1505 { // Skip segments of overlapping url string |
1506 { // Skip segments of overlapping url string |
1506 carryOverInc -= aSource.Ptr( position ).Length(); |
1507 carryOverInc -= aSource.Ptr( position ).Length(); |
1507 position += aSource.Ptr( position ).Length(); |
1508 position += aSource.Ptr( position ).Length(); |
1508 } |
1509 } |
1509 |
1510 |
2217 statusText = StringLoader::LoadL(R_FREESTYLE_EMAIL_UI_VIEWER_FETCHING_CONTENT_TEXT); |
2218 statusText = StringLoader::LoadL(R_FREESTYLE_EMAIL_UI_VIEWER_FETCHING_CONTENT_TEXT); |
2218 iAppUi.FsTextureManager()->ProvideBitmapL(EStatusTextureSynchronising, image, imageMask ); |
2219 iAppUi.FsTextureManager()->ProvideBitmapL(EStatusTextureSynchronising, image, imageMask ); |
2219 iStatusIndicator->ShowIndicatorL( image, imageMask, statusText, aDuration ); |
2220 iStatusIndicator->ShowIndicatorL( image, imageMask, statusText, aDuration ); |
2220 } |
2221 } |
2221 |
2222 |
|
2223 void CFsEmailUiHtmlViewerContainer::MailListModelUpdatedL() |
|
2224 { |
|
2225 FUNC_LOG; |
|
2226 UpdateOverlayButtons( IsVisible() ); |
|
2227 } |
|
2228 |