Handle authorization or enrollment of parent devices
Show the parents of a target (i.e. the devices that the target is connected via) in the device dialog. On "Authorize & Connect" also enroll/authorize any parents that need to be authorized/enrolled as well.
Can be tested via bolt-mock
:
sudo bolt-mock
controller new
launch GNOME Settings and also disable authorization in the panel
device new 0-0 cable
device new 0-100 dock
device new 0-101 gpu
re-enable authorization in the panel. Now the parents should be visible, have a warning icon. Authorization should work and parents should be authorized (NB: the doc of gtk_container_get_children
does not say anything about the order, but I should be the correct one).
NB: there is a not handled corner case: if a parent is enrolled but not authorized and the target is not enrolled, we are in trouble and cannot do the right thing. I have an idea to fix that but I might not make it before the UI freeze.
Update: I added a new function to BoltClient
that can handle a mix of Authroize
and Enroll
operations so that corner should be fixed.
Closes #128 (closed)