diff -r 0b192a3a05a4 -r 6a29d5ad0713 bluetoothengine/btnotif/src/btnpaireddevsettnotifier.cpp --- a/bluetoothengine/btnotif/src/btnpaireddevsettnotifier.cpp Tue Feb 02 00:20:42 2010 +0200 +++ b/bluetoothengine/btnotif/src/btnpaireddevsettnotifier.cpp Fri Feb 19 22:59:18 2010 +0200 @@ -18,22 +18,22 @@ // INCLUDE FILES -#include // Localisation stringloader #include // Own resources #include +#include #include "btnotiflock.h" -#include "btnpaireddevsettNotifier.h" // Own class definition -#include "BTNotifDebug.h" // Debugging macros +#include "btnpaireddevsettnotifier.h" // Own class definition +#include "btNotifDebug.h" // Debugging macros #include #include "btnotifnameutils.h" -#include +#include #include -#include // CoverUI +#include // CoverUI #ifdef __SERIES60_HELP -#include +#include #include // The bt hrh info is needed, for help launching #endif @@ -127,26 +127,23 @@ TBTDeviceName name; BtNotifNameUtils::GetDeviceDisplayName(name, iDevice); + RBuf stringholder; + stringholder.CleanupClosePushL(); + // 1. Show pairing status note FTRACE(FPrint(_L("[BTNOTIF]\t CBTPairedDevSettNotifier iPairingStatus: %d"), iPairingStatus)); TInt resourceId = ProcessPairingErrorCode( iPairingStatus ); - HBufC* stringholder = StringLoader::LoadLC( resourceId ); - _LIT(PU,"%U"); - if( stringholder->Find(PU) != KErrNotFound) - { - CleanupStack::PopAndDestroy( stringholder ); - stringholder = StringLoader::LoadLC( resourceId, name ); - } - + BluetoothUiUtil::LoadResourceAndSubstringL( stringholder, resourceId, name, 0 ); + if (!iPairingStatus) { - iNotifUiUtil->ShowConfirmationNoteL( ETrue, *stringholder, iSecondaryDisplayCommand, name ); + iNotifUiUtil->ShowConfirmationNoteL( ETrue, stringholder, iSecondaryDisplayCommand, name ); } else { - iNotifUiUtil->ShowErrorNoteL( ETrue, *stringholder, iSecondaryDisplayCommand, name ); + iNotifUiUtil->ShowErrorNoteL( ETrue, stringholder, iSecondaryDisplayCommand, name ); } - CleanupStack::PopAndDestroy( stringholder ); // stringholder + CleanupStack::PopAndDestroy( &stringholder ); if( iPairingStatus || (iDevice && iDevice->GlobalSecurity().Banned() ) ) {