Added validation for maximum length of hotspot SSID, which cannot exceed
32 bytes. As this error might be unintuitive, an error message was also
added below the entry row similar to the password entry row. The error
messages are generic as some characters can require multiple bytes and
mentioning the byte limitation might be too technical.
Fixes#1065
Boy this was hard.
To ease the pain of porting wireless-security to GTK4, add
a new WsFileChooserButton class that mimics the behavior of
a button that triggers a filechooser, as per the migration
guide suggests.
There were lots of GtkGrids, so the diff is particularly
horrendous. Sorry.
This needs serious testing before landing.
The Wifi Hotspot setup dialog will error "Must have a minimum of 8 characters"
for all the situations in which nm_utils_wpa_psk_valid and nm_utils_wep_key_valid
report a given password to be invalid.
The case when this error is most obvious is when you enter a very lengthy password
and the dialog shows the very same error about the minimum password length.
These changes make the dialog account for the Maximum password length as well. It
assumes 16 characters for WEP and 63 characters for WPA/WPA2.
As the hotspot dialog is reused, we have to reset the connection label
everytime it’s shown. Otherwise obsolete informations shall be shown
if there isn't any active connection
Setting markup within UI file might be bad as some translators
might break those markups.
Setting it in C source allows to exclude the markups from being
translated, and thus to not confuse translators.
642be83798 (note_608677)