--- a/messagingapp/msgnotifications/msgerrornotifier/src/msgerrornotifiersvc.cpp Thu Jun 17 09:57:06 2010 +0100
+++ b/messagingapp/msgnotifications/msgerrornotifier/src/msgerrornotifiersvc.cpp Thu Jul 22 16:32:06 2010 +0100
@@ -26,17 +26,19 @@
#include <xqappmgr.h>
#include <ccsdefs.h>
#include <qaction.h>
+#include <xqsystemtoneservice.h>
#define LOC_VIEW hbTrId("txt_messaging_button_view")
#define LOC_CANCEL hbTrId("txt_common_button_cancel")
#define LOC_SEND_FAILURE hbTrId("txt_messaging_list_message_sending_failed")
-
+#define LOC_MMS_RETRIEVAL_FAILED hbTrId("txt_messaging_dialog_mms_retrieval_failed")
//---------------------------------------------------------
// Constructor
//---------------------------------------------------------
MsgErrorNotifierSvc::MsgErrorNotifierSvc(QObject* parent) :
XQServiceProvider(QLatin1String("messaging.com.nokia.symbian.MsgErrorNotifier"), parent)
{
+ mSts = new XQSystemToneService();
publishAll();
}
@@ -45,7 +47,11 @@
//---------------------------------------------------------
MsgErrorNotifierSvc::~MsgErrorNotifierSvc()
{
-
+ if(mSts)
+ {
+ delete mSts;
+ mSts = NULL;
+ }
}
//---------------------------------------------------------
@@ -67,7 +73,7 @@
int msgType = third.toInt();
if (msgType == ECsMmsNotification)
{
- errorNote.append("Message Retrieval Failed!");//TODO: use logical str name
+ errorNote.append(LOC_MMS_RETRIEVAL_FAILED);
}
else
{
@@ -84,15 +90,18 @@
messageBox.setAction(actionView,HbDeviceMessageBox::AcceptButtonRole);
QAction* actionQuit = new QAction(LOC_CANCEL,this);
- actionQuit->setMenuRole(QAction::QuitRole);
- messageBox.setAction(actionView,HbDeviceMessageBox::RejectButtonRole);
+ messageBox.setAction(actionQuit,HbDeviceMessageBox::RejectButtonRole);
setCurrentRequestAsync();
+ //Play audio alert when error notification is shown
+ mSts->playTone(XQSystemToneService::MessageSendFailureTone);
+
+ // launch Messagebox
const QAction* result = messageBox.exec();
-
- // TODO: use XQAiwrequest
- if (result->menuRole() != QAction::QuitRole) {
+
+ // if accepted launch view else quit
+ if (messageBox.isAcceptAction(result)) {
QList<QVariant> args;
QString serviceName("com.nokia.services.hbserviceprovider");
QString operation("open(qint64)");