Implement listener for setting change.