70 CAlfEnv& aEnv, |
70 CAlfEnv& aEnv, |
71 CFreestyleEmailUiAppUi& aAppUi, |
71 CFreestyleEmailUiAppUi& aAppUi, |
72 CAlfControlGroup& aControlGroup ) |
72 CAlfControlGroup& aControlGroup ) |
73 { |
73 { |
74 FUNC_LOG; |
74 FUNC_LOG; |
75 CFsEmailUiHtmlViewerView* self = new ( ELeave ) CFsEmailUiHtmlViewerView( aEnv, aAppUi, aControlGroup ); |
75 CFsEmailUiHtmlViewerView* self = new ( ELeave ) CFsEmailUiHtmlViewerView( |
|
76 aEnv, aAppUi, aControlGroup ); |
76 CleanupStack::PushL( self ); |
77 CleanupStack::PushL( self ); |
77 self->ConstructL(); |
78 self->ConstructL(); |
78 CleanupStack::Pop( self ); |
79 CleanupStack::Pop( self ); |
79 return self; |
80 return self; |
80 } |
81 } |
1040 respondStatus, *iMessage, *this ); |
1041 respondStatus, *iMessage, *this ); |
1041 } |
1042 } |
1042 } |
1043 } |
1043 } |
1044 } |
1044 |
1045 |
1045 void CFsEmailUiHtmlViewerView::HandleStatusPaneSizeChange() |
|
1046 { |
|
1047 CFsEmailUiViewBase::HandleStatusPaneSizeChange(); |
|
1048 |
|
1049 HandleViewRectChange(); |
|
1050 } |
|
1051 |
1046 |
1052 void CFsEmailUiHtmlViewerView::HandleViewRectChange() |
1047 void CFsEmailUiHtmlViewerView::HandleViewRectChange() |
1053 { |
1048 { |
1054 CFsEmailUiViewBase::HandleViewRectChange(); |
1049 CFsEmailUiViewBase::HandleViewRectChange(); |
1055 |
1050 |
2188 UpdateMessagePtrL( mailboxId, folderId, messageId ); |
2183 UpdateMessagePtrL( mailboxId, folderId, messageId ); |
2189 reloadContent = ETrue; |
2184 reloadContent = ETrue; |
2190 } |
2185 } |
2191 } |
2186 } |
2192 } |
2187 } |
2193 if(iContainer) |
2188 |
|
2189 if ( iContainer ) |
2194 { |
2190 { |
2195 iContainer->HideDownloadStatus(); |
2191 iContainer->HideDownloadStatus(); |
2196 } |
2192 } |
|
2193 |
2197 if ( reloadContent ) |
2194 if ( reloadContent ) |
2198 { |
2195 { |
2199 |
2196 if ( iContainer ) |
2200 if ( iContainer ) |
2197 { |
2201 { |
2198 iContainer->ResetContent( EFalse, EFalse ); |
2202 iContainer->ResetContent(); |
2199 if ( iMessage ) |
2203 if( iMessage ) |
2200 { |
2204 { |
2201 LoadContentFromMailMessageL( iMessage , EFalse ); |
2205 LoadContentFromMailMessageL( iMessage , EFalse); |
|
2206 SetMskL(); |
2202 SetMskL(); |
2207 } |
2203 } |
2208 } |
2204 } |
2209 } |
2205 } |
2210 |
2206 |
2211 |
2207 if ( iAsyncProcessComplete && iWaitDialog && iDialogNotDismissed ) |
2212 if(iAsyncProcessComplete && iWaitDialog && iDialogNotDismissed) |
|
2213 { |
2208 { |
2214 iWaitDialog->ProcessFinishedL(); // deletes the dialog |
2209 iWaitDialog->ProcessFinishedL(); // deletes the dialog |
2215 } |
2210 } |
2216 |
|
2217 } |
2211 } |
2218 |
2212 |
2219 // ----------------------------------------------------------------------------- |
2213 // ----------------------------------------------------------------------------- |
2220 // CFsEmailUiHtmlViewerView::DialogDismissedL |
2214 // CFsEmailUiHtmlViewerView::DialogDismissedL |
2221 // ----------------------------------------------------------------------------- |
2215 // ----------------------------------------------------------------------------- |
2973 |
2967 |
2974 // Gets the default application UID for for the given MIME type |
2968 // Gets the default application UID for for the given MIME type |
2975 TUid uid; |
2969 TUid uid; |
2976 TDataType dataType( _L8( "text/html" ) ); |
2970 TDataType dataType( _L8( "text/html" ) ); |
2977 session.AppForDataType( dataType, uid ); |
2971 session.AppForDataType( dataType, uid ); |
2978 |
2972 |
2979 // Runs the default application using the dataType |
2973 if (uid != TUid::Uid(0) ) //only open link when default browser exist. |
2980 TThreadId threadId; |
2974 { |
2981 User::LeaveIfError( session.StartDocument( aUrl , dataType, threadId ) ); |
2975 TApaTaskList taskList( iEikonEnv->WsSession() ); |
2982 |
2976 TApaTask task = taskList.FindApp( uid ); |
2983 CleanupStack::PopAndDestroy(); // session |
2977 if ( task.Exists() ) |
2984 } |
2978 { |
|
2979 HBufC8 * param8 = HBufC8::NewLC( aUrl.Length() ); |
|
2980 param8->Des().Append( aUrl ); |
|
2981 task.SendMessage( TUid::Uid( 0 ), *param8 ); |
|
2982 CleanupStack::PopAndDestroy( param8 ); |
|
2983 } |
|
2984 else |
|
2985 { |
|
2986 // Runs the default application using the dataType |
|
2987 TThreadId threadId; |
|
2988 User::LeaveIfError( session.StartDocument( aUrl , dataType, threadId ) ); |
|
2989 } |
|
2990 } |
|
2991 CleanupStack::PopAndDestroy( &session ); |
|
2992 } |
2985 |
2993 |
2986 // -------------------------------------------------------------------------------- |
2994 // -------------------------------------------------------------------------------- |
2987 // CFsEmailUiHtmlViewerView::SaveWebAddressToFavouritesL |
2995 // CFsEmailUiHtmlViewerView::SaveWebAddressToFavouritesL |
2988 // -------------------------------------------------------------------------------- |
2996 // -------------------------------------------------------------------------------- |
2989 void CFsEmailUiHtmlViewerView::SaveWebAddressToFavouritesL( const TDesC& aUrl ) const |
2997 void CFsEmailUiHtmlViewerView::SaveWebAddressToFavouritesL( const TDesC& aUrl ) const |