For earnings, you can set different amounts that will take effect if the spouse/partner dies first, for example if you plan to reduce hours, or take an additional job.
You can change amounts, or even eliminate all earnings in case of the spouse/partner's death. To model earnings that will only occur if the spouse/partner dies, then add a new job and only enter earnings under the contingency settings area.
Note that on the overview screen for each adult you can set a contingency for retirement age so any earnings that are set to end at 'Retirement' will end at that age if the contingency takes effect.