When the IP method is "disabled" or "shared" then everything else is
supposed to be insensitive. This currently fails if you toggle between
the two, because it's implemented using property bindings that are just
not smart enough to handle this task. Handle sensitivity only in
method_changed() to avoid this.
Additionally, not all of the widgets are being consistently
disabled/enabled when appropriate. E.g. when the method is "local" then
only the DNS entry, route entries, and default route checkboxes become
insensitive, leaving the other widgets, including notably the Automatic
switches, sensitive. They should all become insensitive, as when the
method is "disabled" or "shared." Fix this by organizing all the related
widgets into boxes and setting the sensitivity of the entire box. (Note
the strategy followed here does not exactly match nm-connection-editor,
which always allows editing addresses. We only allow that in Manual
mode. I'm not sure if this is advisable or not, so won't touch that.)
Finally, the Automatic DNS and Automatic Routes toggles should only be
sensitive when the method is "Automatic".
When the entry is initially empty, there is no error. If you enter
anything and then delete it, the entry is left in the error state. Empty
should not be an error.
This reverts commit 8a4a80b7b2.
This is a manual revert, because the code changed considerably in
a2b9620b1b. Anyway, although this seemed
like a good idea, problem is it clobbers the original state of the
connection without any explicit user action if the connection is
configured to use both manual and auto DNS. And this happens in practice
for imported Wireguard connections, which uselessly have auto DNS
enabled due to this NetworkManager bug:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1399
Additional discussion:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1745#note_2112420
The simplest solution is to not try to prevent the user from configuring
both manual and auto DNS. Instead, let's just warn the user that this
configuration may not be intended in a follow-up commit.
Fixes#2617
Even though the routes_metric_label is in a GtkSizeGroup with the
GtkEntry for the metric, its size was set too big after adding the entry
to the size group. To fix this, add all the other labels and
corresponding entries to size groups as well. The hexpand can then be
removed as well on the labels.
Fixes#1235
Our callback handler for the AdwComboRow::selected-item property
changes gets called at startup, resulting in a slow and unnecessary
default app change.
This is a workaround to avoid calling g_app_info_set_as_default_for_type
without user input.
Fixes#2626Fixes#2683
Otherwise the size of the window jumps while scrolling through it, since
we don't want to actually ellipsize them by default we increase a bit
the default width of the dialog, which used to be 360.