notes/notesui/notesviews/src/notesmainview.cpp
changeset 75 7ac58b2aae6f
parent 70 a5ed90760192
child 81 ce92091cbd61
equal deleted inserted replaced
72:27feeedec790 75:7ac58b2aae6f
   365 		mMarkTodoAction =
   365 		mMarkTodoAction =
   366 				contextMenu->addAction(
   366 				contextMenu->addAction(
   367 						hbTrId("txt_notes_menu_make_it_as_todo_note"));
   367 						hbTrId("txt_notes_menu_make_it_as_todo_note"));
   368 
   368 
   369 	} else if (AgendaEntry::TypeTodo == entry.type()) {
   369 	} else if (AgendaEntry::TypeTodo == entry.type()) {
   370 		if (AgendaEntry::TodoNeedsAction == entry.status()) {
   370 		if (AgendaEntry::TodoCompleted != entry.status()) {
   371 			mTodoStatusAction = contextMenu->addAction(
   371 			mTodoStatusAction = contextMenu->addAction(
   372 					hbTrId("txt_notes_menu_mark_as_done"));
   372 					hbTrId("txt_notes_menu_mark_as_done"));
   373 		} else if (AgendaEntry::TodoCompleted == entry.status()) {
   373 		} else {
   374 			mTodoStatusAction = contextMenu->addAction(
   374 			mTodoStatusAction = contextMenu->addAction(
   375 					hbTrId("txt_notes_menu_mark_as_not_done"));
   375 					hbTrId("txt_notes_menu_mark_as_not_done"));
   376 		}
   376 		}
   377 	}
   377 	}
   378 
   378 
   424 			NotesNamespace::IdRole).value<qulonglong>();
   424 			NotesNamespace::IdRole).value<qulonglong>();
   425 	AgendaEntry entry = mAgendaUtil->fetchById(noteId);
   425 	AgendaEntry entry = mAgendaUtil->fetchById(noteId);
   426 
   426 
   427 	QDateTime currentDateTime = QDateTime::currentDateTime();
   427 	QDateTime currentDateTime = QDateTime::currentDateTime();
   428 
   428 
   429 	if (AgendaEntry::TodoNeedsAction == entry.status()) {
   429 	if (AgendaEntry::TodoCompleted != entry.status()) {
   430 		mAgendaUtil->setCompleted(entry, true, currentDateTime);
   430 		mAgendaUtil->setCompleted(entry, true, currentDateTime);
   431 	} else if (AgendaEntry::TodoCompleted == entry.status()) {
   431 	} else {
   432 		mAgendaUtil->setCompleted(entry, false, currentDateTime);
   432 		mAgendaUtil->setCompleted(entry, false, currentDateTime);
   433 	}
   433 	}
   434 
   434 
   435 	OstTraceFunctionExit0( NOTESMAINVIEW_MARKTODOSTATUS_EXIT );
   435 	OstTraceFunctionExit0( NOTESMAINVIEW_MARKTODOSTATUS_EXIT );
   436 }
   436 }