Skip to content

Tails Cloner: Pressing enter hits start button if only 1 device, opens combobox if 2, keeps last selection on `populate_devices()` (#6878 and #20098)

Ben Westgate requested to merge BenWestgate/tails:Press-Enter-to-Clone into stable
  • #6878 asked for Tails Cloner to start when enter is pressed and there is only one device.
  • I decided when there are 2 devices it should open the combobox dropdown. (this also allows immediate arrow key selection)

This MR will grab_focus as per the above at start and whenever the number of drives in target_list increases. This allows the UI to be navigated with the keyboard without losing position on populate_devices() calls, if there are no new drives in the list.

Finally, #20098 is a bug where if 2 or more devices were present and anything called populate_devices() the selection reset to the first of the GtkListStore, now the last selected USB stick remains the active selection. If the last selection is removed, the combobox grabs focus if 2 or more USB sticks remain, otherwise nothing.

This eliminates the risk of someone selecting a Target USB stick, then toggling the source or removing a different USB stick and not noticing their selection reset.

Closes #6878. Closes #20098.

Edited by Ben Westgate

Merge request reports