Skip to content

Commit

Permalink
Fix nmlib WireGuard constant namespace change
Browse files Browse the repository at this point in the history
  • Loading branch information
milouse committed Jul 24, 2023
1 parent 701be49 commit 5fc8b4f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Views/VPNPage.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Widgets/DeviceList.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Widgets/VPN/VPNInfoDialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 5fc8b4f

Please sign in to comment.