Now when there's a violation of the USB PD power rules, an icon appears
to alert the user to their charger's noncompliance. The icon has a
tooltip explaining its meaning.
To add support for the new features in firmware 1.1.0, I decided to
split the Sink screen into two sections: Configuration and Power
Delivery. The Configuration section contains all the things the Sink
screen had before, with some layout changes (notably the Save button is
part of the Configuration section, not in the HeaderBar). The Power
Delivery section has the new features: an Output switch, which works
perfectly, and a currently half-baked Source Capabilities list item
which will eventually open a window to show the capabilities, but for
now just prints them.
Previously, the SelectListStore directly modified the GUI in its
update_items method, which was really just poor form.
This has been corrected by creating a new SelectList to encapsulate all
the GUI elements from the select-stack downward. This handles showing
the select-none or select-frame elements as appropriate, as well as
adding the list item separators. It's much nicer than the old way, if I
do say so myself.
It's by no means wonderful internally, but to a large extent it works.
The list functionality is still untested, since I won't be able to have
two PDB Sinks connected to my computer at once until tomorrow. But for
now, a neat little GUI.