This fixes some alignment issues and cleans up code.
Under certain circumstances the spinner wasn't hidden when clicking Update on the update confirmation dialog. Also, the window wasn't focused after the click. This should be fixed now.
This is also an attempt to fix #443 where I assume that
selection can ne
None if there is no treeview because the window wasn't drawn / was closed. Please check if this assumption is correct.