Enable/disable undo/redo buttons as required

Signed-off-by: Michael Buesch <m@bues.ch>