diff -r 04da681812a9 -r 457cd4423b8c commondrm/drmutility/src/drmutilityui.cpp --- a/commondrm/drmutility/src/drmutilityui.cpp Tue Apr 27 16:56:11 2010 +0300 +++ b/commondrm/drmutility/src/drmutilityui.cpp Tue May 11 16:28:38 2010 +0300 @@ -32,6 +32,7 @@ #include #include #include +#include // secondary display support #include @@ -231,6 +232,8 @@ iNoteList.Close(); FeatureManager::UnInitializeLib(); + delete iNoteWrapper; + } // ----------------------------------------------------------------------------- @@ -769,6 +772,39 @@ #endif // RD_DRM_PREVIEW_RIGHT_FOR_AUDIO +EXPORT_C TInt DRM::CDrmUtilityUI::DisplayMessageQueryL( TInt aMessage, TInt aHeader, const TDesC& aString) + { + TInt buttonCode = 0; + if ( iCoeEnv ) + { + CAknMessageQueryDialog* messageQuery = new (ELeave) CAknMessageQueryDialog(); + messageQuery->PrepareLC(R_DRMUTILITY_SYNC_DIALOG); + + HBufC* headerStringholder ( StringLoader::LoadLC( aHeader, iCoeEnv ) ); + + messageQuery->QueryHeading()->SetTextL(*headerStringholder); + CleanupStack::PopAndDestroy(); // headerStringholder + + HBufC* messageStringholder ( StringLoader::LoadLC( aMessage, aString, iCoeEnv ) ); + + messageQuery->SetMessageTextL(*messageStringholder); + CleanupStack::PopAndDestroy(); // messageStringholder + + buttonCode = messageQuery->RunLD(); + } + else + { + if(!iNoteWrapper) + { + iNoteWrapper = DRM::CDrmUtilityGlobalNoteWrapper::NewL( iUtilityStringResourceReader ); + } + + iNoteWrapper->ShowMessageQueryL(aMessage, aHeader, aString); + } + return buttonCode; + } + + // ----------------------------------------------------------------------------- // CDrmUtilityUI::CreateNoteForResourceL // -----------------------------------------------------------------------------