Added confirmation dialog when discarding

When a user want to discard a new macro he is prompted to verify the
action.