Your code doesn't change the state of the OK button if you select/unselect a nick after the dialog is open.