Skip to content

programming mode: Dim inapplicable bits on word size change

When using a word size less than 64 bit, it is misleading to have the bit buttons larger than that bit size active. This patch dims (de-sensitizes) the applicable bits so they cannot be toggled. It also sets all bits larger than the word size to zero.

As you can see from the code, I come from a C background. I'm sure there is much more elegant Vala-esque way of doing this, which is why I've submitted this MR as a WIP. Feedback would be greatly appreciated.

The reason I check the button labels and toggle if they are set to "1" is because there is no function to directly set a bit to a particular state: there is only the toggle_bit function.

Screenshot with 16-bit wordsize

Edited by A.M. Rowsell

Merge request reports