Handle setting cpl.inventory_focus in SetPriorityWidget.
Refactor.