equal
deleted
inserted
replaced
46 const QString SEND_ICON("qtg_mono_send"); |
46 const QString SEND_ICON("qtg_mono_send"); |
47 const QString DELETE_ICON("qtg_mono_delete"); |
47 const QString DELETE_ICON("qtg_mono_delete"); |
48 |
48 |
49 //LOCALIZED CONSTANTS |
49 //LOCALIZED CONSTANTS |
50 #define LOC_DELETE_MESSAGE hbTrId("txt_messaging_dialog_delete_message") |
50 #define LOC_DELETE_MESSAGE hbTrId("txt_messaging_dialog_delete_message") |
|
51 #define LOC_DELETE_SHARED_MESSAGE hbTrId("txt_messaging_dialog_same_message_exists_in_multip") |
51 |
52 |
52 //---------------------------------------------------------------------------- |
53 //---------------------------------------------------------------------------- |
53 // UnifiedViewer::UnifiedViewer |
54 // UnifiedViewer::UnifiedViewer |
54 // constructor |
55 // constructor |
55 //---------------------------------------------------------------------------- |
56 //---------------------------------------------------------------------------- |
232 // UnifiedViewer::handleDeleteAction |
233 // UnifiedViewer::handleDeleteAction |
233 // @see header file |
234 // @see header file |
234 //--------------------------------------------------------------- |
235 //--------------------------------------------------------------- |
235 void UnifiedViewer::handleDeleteAction() |
236 void UnifiedViewer::handleDeleteAction() |
236 { |
237 { |
237 HbMessageBox::question(LOC_DELETE_MESSAGE,this, |
238 QString txt = LOC_DELETE_MESSAGE; |
238 SLOT(onDialogDeleteMsg(HbAction*)), |
239 |
|
240 //if mms and out going. check for sharing |
|
241 if((mViewFeeder->msgType() == KSenduiMtmMmsUidValue) && (!mViewFeeder->isIncoming())) |
|
242 { |
|
243 if(mViewFeeder->recipientCount() > 1 ) |
|
244 { |
|
245 txt = LOC_DELETE_SHARED_MESSAGE; |
|
246 } |
|
247 } |
|
248 |
|
249 HbMessageBox::question(txt,this,SLOT(onDialogDeleteMsg(int)), |
239 HbMessageBox::Delete | HbMessageBox::Cancel); |
250 HbMessageBox::Delete | HbMessageBox::Cancel); |
240 } |
251 } |
241 |
252 |
242 //--------------------------------------------------------------- |
253 //--------------------------------------------------------------- |
243 // UnifiedViewer::sendMessage |
254 // UnifiedViewer::sendMessage |
268 |
279 |
269 //--------------------------------------------------------------- |
280 //--------------------------------------------------------------- |
270 // UnifiedViewer::onDialogDeleteMsg |
281 // UnifiedViewer::onDialogDeleteMsg |
271 // @see header file |
282 // @see header file |
272 //--------------------------------------------------------------- |
283 //--------------------------------------------------------------- |
273 void UnifiedViewer::onDialogDeleteMsg(HbAction* action) |
284 void UnifiedViewer::onDialogDeleteMsg(int val) |
274 { |
285 { |
275 HbMessageBox *dlg = qobject_cast<HbMessageBox*> (sender()); |
286 if (val == HbMessageBox::Delete) { |
276 if (action == dlg->actions().at(0)) { |
|
277 QList<int> msgIdList; |
287 QList<int> msgIdList; |
278 msgIdList << mMessageId; |
288 msgIdList << mMessageId; |
279 |
289 |
280 ConversationsEngine::instance()->deleteMessages(msgIdList); |
290 ConversationsEngine::instance()->deleteMessages(msgIdList); |
281 |
291 |