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 |