nmtui: fix WireGuard peer editor empty fields

Previously, input fields for peer attributes such as 'Public Key' were
not pre-populated with the existing settings of the peer. This was due
to the WireGuard peer editor class not setting its peer property during
object construction, as the necessary flag was absent. This commit
addresses and fixes this issue.

Closes #1443

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1851
(cherry picked from commit 7e7d3a7981)
This commit is contained in:
Javier Sánchez Parra 2024-01-29 10:38:38 +01:00 committed by Fernando Fernandez Mancera
parent cbf8723273
commit 854f7275de

View file

@ -237,11 +237,12 @@ nmt_wireguard_peer_editor_class_init(NmtWireguardPeerEditorClass *peer_class)
*
* The page's #NMWireGuardPeer.
*/
g_object_class_install_property(object_class,
PROP_PEER,
g_param_spec_boxed("peer",
"",
"",
nm_wireguard_peer_get_type(),
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property(
object_class,
PROP_PEER,
g_param_spec_boxed("peer",
"",
"",
nm_wireguard_peer_get_type(),
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
}