Before now, if an error occurred when sending a command, it passed
silently. This is a Bad Thing™, so it's been fixed. Now if there's an
error, an error dialog appears with some information about what
happened. If the error occurred on the Sink page, the program goes back
to the device list after the error dialog is closed.
Before now, the Save button appeared when the voltage and current
widgets changed their value. If they were then changed back to the
original values, the Save button was still visible, allowing unnecessary
wear on the flash. (the sarcastic horror!)
Now, the Save button is only shown when the voltage and current are not
both at their saved values. A minor tweak, but we're closer to the
original design now.
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.
Previously, we refreshed the list by completely erasing it and building
a new one. While simple, it caused some obnoxious visual glitches, and
I could imagine some more serious problems it might have caused as well.
Now we remove only the devices that don't exist any more, and add only
those that we don't already know about. Much better for the user
interface, but O(n^2). Oh well, I doubt anyone will have enough PD
Buddies connected at once for that to matter much.
Previously, the device list only loaded once on startup. This was poor
behaviour, as devices can be attached and detached at any time.
Now the attached devices are polled once per second, and the list is
updated accordingly. The code behind it is a bit messy because the
list model interacts directly with parts of the GUI, but it works
pretty well nevertheless. There's no mechanism to kick us out of the
configuration screen if the device we're configuring is detached, but
this can be addressed later. For now, I'm reasonably happy with this
new feature.
It had been stretched vertically due to the two text labels stretching
the whole grid. Now the button is square, because it's set to align
center rather than fill.
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.