Rewrote the CustomDialog class in order to improve the behaviour, added a new constructor for if you only want a confirm button.
Merge remote-tracking branch 'origin/master'