diff -r 26b6f0522fd8 -r 8110bf1194d1 iaupdate/IAD/backgroundchecker/src/iaupdatebgrefreshtimer.cpp --- a/iaupdate/IAD/backgroundchecker/src/iaupdatebgrefreshtimer.cpp Mon May 03 12:38:03 2010 +0300 +++ b/iaupdate/IAD/backgroundchecker/src/iaupdatebgrefreshtimer.cpp Fri May 14 15:58:48 2010 +0300 @@ -25,12 +25,16 @@ #include #include #include -#include +// #include +//#include +//#include +//#include #include #include #include //sysversioninfo #include +#include #include "iaupdateprivatecrkeys.h" #include "iaupdate.hrh" @@ -47,6 +51,8 @@ _LIT(KImageFile, "qgn_note_swupdate_notification.svg"); _LIT8( KFirstTimeCase, "0" ); + + //CONSTANTS const TUint KIADUpdateLauncherUid( 0x2001FE2F ); @@ -1788,23 +1794,88 @@ // ---------------------------------------------------------- void CIAUpdateBGTimer::LaunchNotificationL( const int aNrOfUpdates ) { - - _LIT( KIcon, "C:\\qgn_note_swupdate_notification.svg" ); + _LIT( KFirstTimeText, "Check for updates ?" ); _LIT( KNormalText, "Updates available" ); _LIT( KSecondText, "Tap to view" ); + + // loc: + /* + _LIT( KIcon, "z:\\resource\\iaupdate\\qgn_note_swupdate_notification.svg" ); + _LIT(KLocFile, "Text_Map_Swupdate_"); + _LIT(KLocFilePath, "z:\\resource\\iaupdate\\"); + + _LIT(KTitleFirstTime, "txt_software_update_list_software_update"); + _LIT(KTitleOneUpdate, "txt_software_dpophead_update_available"); + _LIT(KTitleSeveralUpdates, "txt_software_dpophead_updates_available"); + + + _LIT(KSecondFirstTime, "txt_software_update_list_software_update"); + _LIT(KSecondOneUpdate, "txt_software_dpopinfo_val_1_new"); + _LIT(KSecondSeveralUpdates, "txt_software_dpopinfo_ln_new"); + */ FLOG("[bgchecker] LaunchNotificationL "); iMode = ModeL(); - //text for 1st line - if ( iMode == ENormalMode ) - { - - } + // loc: initialize localisation text loader + /* + TBool res = HbTextResolverSymbian::Init(KLocFile, KLocFilePath); + if ( res != KErrNone ) + { + // nothing to do + } + */ + + + // loc: Resolve title text + /* + HBufC* titleText; + if ( aNrOfUpdates == 0 ) + { + // First time case + titleText = HbTextResolverSymbian::LoadL( KTitleFirstTime ); + } + else if ( aNrOfUpdates == 1 ) + { + // one update available + titleText = HbTextResolverSymbian::LoadL( KTitleOneUpdate ); + } + else + { + // several updates available + titleText = HbTextResolverSymbian::LoadL( KTitleSeveralUpdates ); + } + + // Resolve second text + HBufC* secondText; + if ( aNrOfUpdates == 0 ) + { + // First time case + secondText = HbTextResolverSymbian::LoadL( KSecondFirstTime ); + } + else if ( aNrOfUpdates == 1 ) + { + // one update available + secondText = HbTextResolverSymbian::LoadL( KSecondOneUpdate, aNrOfUpdates ); + } + else + { + // several updates available + // loc: text.append(hbTrId("txt_software_dblist_updates_available")); + secondText = HbTextResolverSymbian::LoadL( KSecondSeveralUpdates, aNrOfUpdates ); + } + */ + + // loc: Load title and second line + // HBufC* titleText = HbTextResolverSymbian::LoadL(KTextTitle); + // CleanupStack::PushL( titleText ); + // HBufC* secondText3 = HbTextResolverSymbian::LoadL(KTextSecond); + // CleanupStack::PushL( titleText ); //TBuf<256> iconPath; + TBuf<128> titleText; TBuf<128> secondText; @@ -1835,10 +1906,18 @@ //CleanupStack::PopAndDestroy( image ); } } + + // loc: set image path + // iSoftNotification->SetImagePathL( KIcon ); // Set texts + // loc: iSoftNotification->SetTextL( titleText->Des(), secondText->Des() ); iSoftNotification->SetTextL( titleText, secondText ); + // loc: delete text buffers + // CleanupStack::PopAndDestroy( titleText ); + // CleanupStack::PopAndDestroy( titleText ); + // Set number of updates iSoftNotification->SetNrOfUpdates( aNrOfUpdates ); @@ -1851,7 +1930,7 @@ // ---------------------------------------------------------- // CIAUpdateBGTimer::LaunchSoftNotificationL() // ---------------------------------------------------------- -/* +/* HLa void CIAUpdateBGTimer::LaunchSoftNotificationL( const TInt& aResourceId, const TInt& SK1, const TInt& SK2 ) { iInternalFile->ReadControllerDataL(); @@ -1893,6 +1972,7 @@ } */ + // ---------------------------------------------------------- // CIAUpdateBGTimer::GetPrivatePathL() // ---------------------------------------------------------- @@ -1920,6 +2000,7 @@ return err; } +/* // ---------------------------------------------------------- // CIAUpdateBGTimer::LoadFileLC() // ---------------------------------------------------------- @@ -1941,7 +2022,7 @@ CleanupDeletePushL(imagebuf); return imagebuf; } - +*/ // ---------------------------------------------------------- // CIAUpdateBGTimer::SetPrivateDriveL() @@ -2030,6 +2111,7 @@ return driveNum; } + // ---------------------------------------------------------- // CIAUpdateBGTimer::ReadResourceLC() // ----------------------------------------------------------