Update bagomagui.py

corrected indentation, added support for Cancel buttons.