add preference dialog handler