Additional functionality in Dialog

Provided by Mathieu Dumoulin