Make dialogs center on owner

The changed code will have the dialogs pop centered to the owner. This is better than just centering to the screen especially in multiple window/multiple monitor applications.