diff -r 0b192a3a05a4 -r 6a29d5ad0713 bluetoothengine/btnotif/src/BTNInqUI.cpp --- a/bluetoothengine/btnotif/src/BTNInqUI.cpp Tue Feb 02 00:20:42 2010 +0200 +++ b/bluetoothengine/btnotif/src/BTNInqUI.cpp Fri Feb 19 22:59:18 2010 +0200 @@ -22,7 +22,6 @@ #include #include #include -#include // Localisation stringloader #include // For WLAN state checking #include #include @@ -33,6 +32,7 @@ #include // Borrow WLan signal strenth bar to show RSSI #include #include +#include #include "btninqui.h" // Own class definition #include "btNotifDebug.h" // Debugging macros #include "btnotifnameutils.h" @@ -1047,21 +1047,14 @@ TInt CBTInqUI::QueryUnblockDeviceL(CBTDevice* aDevice) { FLOG(_L("[BTNOTIF]\t CBTInqUI::QueryUnblockDeviceL()")); - - HBufC* stringholder = NULL; - - if (aDevice->IsValidFriendlyName()) - { - stringholder = StringLoader::LoadLC(R_BT_UNBLOCK_DEVICE, aDevice->FriendlyName()); - } - else - { - stringholder = StringLoader::LoadLC(R_BT_UNBLOCK_DEVICE, BTDeviceNameConverter::ToUnicodeL(aDevice->DeviceName())); - } - - TBTDeviceName name(KNullDesC); + RBuf stringholder; + stringholder.CleanupClosePushL(); + TBTDeviceName name; + BtNotifNameUtils::GetDeviceDisplayName( name, aDevice ); + BluetoothUiUtil::LoadResourceAndSubstringL( + stringholder, R_BT_UNBLOCK_DEVICE, name, 0 ); TInt keypress(0); - keypress = iUiUtil->ShowQueryL( *stringholder, R_BT_UNBLOCK_QUERY, + keypress = iUiUtil->ShowQueryL( stringholder, R_BT_UNBLOCK_QUERY, ECmdBTnotifUnavailable, name, CAknQueryDialog::EConfirmationTone ); CleanupStack::PopAndDestroy(); // stringholder FTRACE(FPrint(_L("[BTNOTIF]\t CBTInqUI::QueryUnblockDeviceL() keypress= %d"),keypress));