- Toggling the checkbox could disable the next button
because only the checked-state was used, instead of
the next-is-enabled-if-everything-is-optional member variable.
FIXES#1271
- Move retranslation to a separate slot to allow it to be
formatted nicely.
- Use calculated m_allLicensesOptional in retranslation.
- Untangle determining if all licenses are optional; std::none_of
returns true on an empty list.
- this isn't really a Calamares thing to decide, and anyway centering
on the desktop is kind of weird in multi-monitor setups and the
DesktopWidget is deprecated as well.
- Scenario: *keepDistribution* is true, and the existing file contains
a GRUB_DISTRIBUTION line **followed** by a commented-out GRUB_DISTRIBUTION
line.
- In that case, the commented-out line would change the flag back to
False, and we'd end up writing a second GRUB_DISTRIBUTION line at the end.
Prevent that: the flag can only go to "True" and then stays there.
Editorial: If your grub configuration would have tripped this up, then
you're doing something wrong. Clean up the configuration file first.
- If we update the line, then GRUB_DISTRIBUTION has been set
- If we don't update the line (e.g. because of *keepDistribution*)
then a comment doesn't count as "have seen that line".
This means that if we get to the end of the file, with only commented-
out GRUB_DISTRIBUTION lines, and *keepDistribution* is set, then we'll
still write a distribution line -- because otherwise it's not set at all.
- Previous fix would erase the distribution information (using an
empty string to flag 'preserve existing GRUB_DISTRIBUTION lines'),
but that is fragile. A distro might set that, and yet **not**
set a GRUB_DISTRIBUTION line, in which case it would end up with
a setup without any GRUB_DISTRIBUTION set.
- When a GRUB_DISTRIBUTION line is found, **then** check if it should
update the line or not. This way, we have a suitable distribution
to write if no GRUB_DISTRIBUTION is found at all.
- move the explicit checking for non-empty into a specific
(normal) password check
- leave only the-two-fields-are-equal outside of the password-
requirements framework
- having non-empty is the same as minLength 1, but gives a different
error message