From 5fc8b4fd1dca748b0192908bb2ae3ad1ad594d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Deparis?= Date: Wed, 22 Dec 2021 20:13:09 +0100 Subject: [PATCH] Fix nmlib WireGuard constant namespace change --- src/Views/VPNPage.vala | 2 +- src/Widgets/DeviceList.vala | 4 ++-- src/Widgets/VPN/VPNInfoDialog.vala | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Views/VPNPage.vala b/src/Views/VPNPage.vala index 2486a815..9b230eb2 100644 --- a/src/Views/VPNPage.vala +++ b/src/Views/VPNPage.vala @@ -242,7 +242,7 @@ public class Network.VPNPage : Network.Widgets.Page { if (ac.get_vpn ()) { active_connections.add ((NM.VpnConnection) ac); (ac as NM.VpnConnection).vpn_state_changed.connect (update); - } else if (ac.get_connection_type () == NM.SETTING_WIREGUARD_SETTING_NAME) { + } else if (ac.get_connection_type () == NM.SettingWireGuard.SETTING_NAME) { active_wireguard_connections.add ((NM.ActiveConnection) ac); (ac as NM.ActiveConnection).state_changed.connect (update); } diff --git a/src/Widgets/DeviceList.vala b/src/Widgets/DeviceList.vala index 025028a7..24a3c03b 100644 --- a/src/Widgets/DeviceList.vala +++ b/src/Widgets/DeviceList.vala @@ -84,7 +84,7 @@ namespace Network.Widgets { public void add_connection (NM.RemoteConnection connection) { switch (connection.get_connection_type ()) { - case NM.SETTING_WIREGUARD_SETTING_NAME: + case NM.SettingWireGuard.SETTING_NAME: case NM.SettingVpn.SETTING_NAME: ((VPNPage)vpn.page).add_connection (connection); break; @@ -95,7 +95,7 @@ namespace Network.Widgets { public void remove_connection (NM.RemoteConnection connection) { switch (connection.get_connection_type ()) { - case NM.SETTING_WIREGUARD_SETTING_NAME: + case NM.SettingWireGuard.SETTING_NAME: case NM.SettingVpn.SETTING_NAME: ((VPNPage)vpn.page).remove_connection (connection); break; diff --git a/src/Widgets/VPN/VPNInfoDialog.vala b/src/Widgets/VPN/VPNInfoDialog.vala index 2abc15af..3206c1db 100644 --- a/src/Widgets/VPN/VPNInfoDialog.vala +++ b/src/Widgets/VPN/VPNInfoDialog.vala @@ -125,8 +125,8 @@ public class Network.Widgets.VPNInfoDialog : Granite.MessageDialog { primary_text = connection.get_id (); switch (connection.get_connection_type ()) { - case NM.SETTING_WIREGUARD_SETTING_NAME: - service_type = NM.SETTING_WIREGUARD_SETTING_NAME; + case NM.SettingWireGuard.SETTING_NAME: + service_type = NM.SettingWireGuard.SETTING_NAME; vpn_type.label = service_type; var wireguard_settings = (NM.SettingWireGuard) connection.get_setting (typeof (NM.SettingWireGuard));