equal
deleted
inserted
replaced
280 |
280 |
281 mDeleteAction = contextMenu->addAction( |
281 mDeleteAction = contextMenu->addAction( |
282 hbTrId("txt_common_menu_delete")); |
282 hbTrId("txt_common_menu_delete")); |
283 |
283 |
284 if (AgendaEntry::TypeTodo == entry.type()) { |
284 if (AgendaEntry::TypeTodo == entry.type()) { |
285 if (AgendaEntry::TodoNeedsAction == entry.status()) { |
285 if (AgendaEntry::TodoCompleted != entry.status()) { |
286 mTodoStatusAction = contextMenu->addAction( |
286 mTodoStatusAction = contextMenu->addAction( |
287 hbTrId("txt_notes_menu_mark_as_done")); |
287 hbTrId("txt_notes_menu_mark_as_done")); |
288 } else if (AgendaEntry::TodoCompleted == entry.status()) { |
288 } else { |
289 mTodoStatusAction = |
289 mTodoStatusAction = |
290 contextMenu->addAction( |
290 contextMenu->addAction( |
291 hbTrId("txt_notes_menu_mark_as_not_done")); |
291 hbTrId("txt_notes_menu_mark_as_not_done")); |
292 } |
292 } |
293 } |
293 } |
335 NotesNamespace::IdRole).value<qulonglong>(); |
335 NotesNamespace::IdRole).value<qulonglong>(); |
336 AgendaEntry entry = mAgendaUtil->fetchById(entryId); |
336 AgendaEntry entry = mAgendaUtil->fetchById(entryId); |
337 |
337 |
338 QDateTime currentDateTime = QDateTime::currentDateTime(); |
338 QDateTime currentDateTime = QDateTime::currentDateTime(); |
339 |
339 |
340 if (AgendaEntry::TodoNeedsAction == entry.status()) { |
340 if (AgendaEntry::TodoCompleted != entry.status()) { |
341 mAgendaUtil->setCompleted(entry, true, currentDateTime); |
341 mAgendaUtil->setCompleted(entry, true, currentDateTime); |
342 } else if (AgendaEntry::TodoCompleted == entry.status()) { |
342 } else { |
343 mAgendaUtil->setCompleted(entry, false, currentDateTime); |
343 mAgendaUtil->setCompleted(entry, false, currentDateTime); |
344 } |
344 } |
345 OstTraceFunctionExit0( NOTESTODOVIEW_MARKTODOSTATUS_EXIT ); |
345 OstTraceFunctionExit0( NOTESTODOVIEW_MARKTODOSTATUS_EXIT ); |
346 } |
346 } |
347 |
347 |