Added dirty flag to indicate preferences for widgets have been changed.