--- a/messagingapp/msgui/msgapp/src/msglistview.cpp Thu Sep 02 20:23:03 2010 +0300
+++ b/messagingapp/msgui/msgapp/src/msglistview.cpp Fri Sep 17 08:28:39 2010 +0300
@@ -55,6 +55,7 @@
//Localized constants
#define LOC_DIALOG_DELETE_CONVERSATION hbTrId("txt_messaging_dialog_delete_conversation")
+#define LOC_DIALOG_UNABLE_TO_DELETE_CONVERSATION hbTrId("txt_messaging_dialog_unable_to_delete_conversation")
//itemspecific menu
#define LOC_OPEN hbTrId("txt_common_menu_open")
@@ -225,10 +226,28 @@
#ifdef _DEBUG_TRACES_
qDebug() << "Inside MsgListView::deleteItem";
#endif
- //confirmation dialog.
- HbMessageBox::question(LOC_DIALOG_DELETE_CONVERSATION,
- this,SLOT(onDialogDeleteMsg(HbAction*)),
- HbMessageBox::Delete | HbMessageBox::Cancel);
+ QModelIndex index = mMsgList->currentIndex();
+ if (index.isValid())
+ {
+ int sendState = index.data(SendingState).toInt();
+ if(ConvergedMessage::Sending == sendState)
+ {
+ //confirmation dialog.
+ HbMessageBox::information(LOC_DIALOG_UNABLE_TO_DELETE_CONVERSATION,
+ 0,0,
+ HbMessageBox::Ok);
+ }
+ // not in sending state and hence can be deleted.
+ else
+ {
+ //confirmation dialog.
+ HbMessageBox::question(LOC_DIALOG_DELETE_CONVERSATION,
+ this,SLOT(onDialogDeleteMsg(HbAction*)),
+ HbMessageBox::Delete | HbMessageBox::Cancel);
+ }
+
+ }
+
#ifdef _DEBUG_TRACES_
qDebug() << " Leaving MsgConversationView::deleteItem";
#endif
@@ -362,12 +381,13 @@
args << data;
//service stuff.
- QString serviceName("com.nokia.services.phonebookservices");
+ QString service("phonebookservices");
+ QString interface("com.nokia.symbian.IContactsEdit");
QString operation("editCreateNew(QString,QString)");
XQAiwRequest* request;
XQApplicationManager appManager;
- request = appManager.create(serviceName, "Fetch", operation, true); // embedded
+ request = appManager.create(service, interface, operation, true); // embedded
if ( request == NULL )
{
return;
@@ -393,12 +413,13 @@
args << contactId;
//service stuff.
- QString serviceName("com.nokia.services.phonebookservices");
- QString operation("open(int)");
+ QString service("phonebookservices");
+ QString interface("com.nokia.symbian.IContactsView");
+ QString operation("openContactCard(int)");
XQAiwRequest* request;
XQApplicationManager appManager;
- request = appManager.create(serviceName, "Fetch", operation, true); // embedded
+ request = appManager.create(service, interface, operation, true); // embedded
if ( request == NULL )
{
return;