equal
deleted
inserted
replaced
53 const QString SORT_ICON("qtg_mono_sort"); |
53 const QString SORT_ICON("qtg_mono_sort"); |
54 |
54 |
55 //Localized constants |
55 //Localized constants |
56 |
56 |
57 #define LOC_DIALOG_DELETE_CONVERSATION hbTrId("txt_messaging_dialog_delete_conversation") |
57 #define LOC_DIALOG_DELETE_CONVERSATION hbTrId("txt_messaging_dialog_delete_conversation") |
|
58 #define LOC_DIALOG_UNABLE_TO_DELETE_CONVERSATION hbTrId("txt_messaging_dialog_unable_to_delete_conversation") |
58 |
59 |
59 //itemspecific menu |
60 //itemspecific menu |
60 #define LOC_OPEN hbTrId("txt_common_menu_open") |
61 #define LOC_OPEN hbTrId("txt_common_menu_open") |
61 #define LOC_SAVETO_CONTACTS hbTrId("txt_messaging_menu_save_to_contacts") |
62 #define LOC_SAVETO_CONTACTS hbTrId("txt_messaging_menu_save_to_contacts") |
62 #define LOC_DELETE_CONVERSATION hbTrId("txt_messaging_menu_delete_conversation") |
63 #define LOC_DELETE_CONVERSATION hbTrId("txt_messaging_menu_delete_conversation") |
223 void MsgListView::deleteItem() |
224 void MsgListView::deleteItem() |
224 { |
225 { |
225 #ifdef _DEBUG_TRACES_ |
226 #ifdef _DEBUG_TRACES_ |
226 qDebug() << "Inside MsgListView::deleteItem"; |
227 qDebug() << "Inside MsgListView::deleteItem"; |
227 #endif |
228 #endif |
228 //confirmation dialog. |
229 QModelIndex index = mMsgList->currentIndex(); |
229 HbMessageBox::question(LOC_DIALOG_DELETE_CONVERSATION, |
230 if (index.isValid()) |
230 this,SLOT(onDialogDeleteMsg(HbAction*)), |
231 { |
231 HbMessageBox::Delete | HbMessageBox::Cancel); |
232 int sendState = index.data(SendingState).toInt(); |
|
233 if(ConvergedMessage::Sending == sendState) |
|
234 { |
|
235 //confirmation dialog. |
|
236 HbMessageBox::information(LOC_DIALOG_UNABLE_TO_DELETE_CONVERSATION, |
|
237 0,0, |
|
238 HbMessageBox::Ok); |
|
239 } |
|
240 // not in sending state and hence can be deleted. |
|
241 else |
|
242 { |
|
243 //confirmation dialog. |
|
244 HbMessageBox::question(LOC_DIALOG_DELETE_CONVERSATION, |
|
245 this,SLOT(onDialogDeleteMsg(HbAction*)), |
|
246 HbMessageBox::Delete | HbMessageBox::Cancel); |
|
247 } |
|
248 |
|
249 } |
|
250 |
232 #ifdef _DEBUG_TRACES_ |
251 #ifdef _DEBUG_TRACES_ |
233 qDebug() << " Leaving MsgConversationView::deleteItem"; |
252 qDebug() << " Leaving MsgConversationView::deleteItem"; |
234 #endif |
253 #endif |
235 } |
254 } |
236 |
255 |
360 |
379 |
361 args << type; |
380 args << type; |
362 args << data; |
381 args << data; |
363 |
382 |
364 //service stuff. |
383 //service stuff. |
365 QString serviceName("com.nokia.services.phonebookservices"); |
384 QString service("phonebookservices"); |
|
385 QString interface("com.nokia.symbian.IContactsEdit"); |
366 QString operation("editCreateNew(QString,QString)"); |
386 QString operation("editCreateNew(QString,QString)"); |
367 |
387 |
368 XQAiwRequest* request; |
388 XQAiwRequest* request; |
369 XQApplicationManager appManager; |
389 XQApplicationManager appManager; |
370 request = appManager.create(serviceName, "Fetch", operation, true); // embedded |
390 request = appManager.create(service, interface, operation, true); // embedded |
371 if ( request == NULL ) |
391 if ( request == NULL ) |
372 { |
392 { |
373 return; |
393 return; |
374 } |
394 } |
375 |
395 |
391 int contactId = mMsgList->currentIndex().data(ContactId).toInt(); |
411 int contactId = mMsgList->currentIndex().data(ContactId).toInt(); |
392 |
412 |
393 args << contactId; |
413 args << contactId; |
394 |
414 |
395 //service stuff. |
415 //service stuff. |
396 QString serviceName("com.nokia.services.phonebookservices"); |
416 QString service("phonebookservices"); |
397 QString operation("open(int)"); |
417 QString interface("com.nokia.symbian.IContactsView"); |
|
418 QString operation("openContactCard(int)"); |
398 |
419 |
399 XQAiwRequest* request; |
420 XQAiwRequest* request; |
400 XQApplicationManager appManager; |
421 XQApplicationManager appManager; |
401 request = appManager.create(serviceName, "Fetch", operation, true); // embedded |
422 request = appManager.create(service, interface, operation, true); // embedded |
402 if ( request == NULL ) |
423 if ( request == NULL ) |
403 { |
424 { |
404 return; |
425 return; |
405 } |
426 } |
406 |
427 |