Add actionCancel

Also check if there is not a running program when setting buttons as enabled when current editor changed.