Integrates done/discard pattern for edit activity

From
https://code.google.com/p/romannurik-code/source/browse/misc/donediscard

Signed-off-by: Ian Lake <ian.hannibal.lake@gmail.com>