From 3d09da64eef93e5e1816be582a64b285400a4b76 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Thu, 16 May 2024 23:09:02 +0800 Subject: [PATCH] pantheon.switchboard-plug-network: 2.5.0 -> 8.0.0 https://github.com/elementary/switchboard-plug-network/compare/2.5.0...8.0.0 --- .../switchboard-plugs/network/default.nix | 18 ++++---- .../switchboard-plugs/network/fix-paths.patch | 42 ++++++++++++++----- 2 files changed, 42 insertions(+), 18 deletions(-) diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/network/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/network/default.nix index 4561bcbc0696..88fcef2ddef4 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/network/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/network/default.nix @@ -7,24 +7,25 @@ , pkg-config , substituteAll , vala +, libadwaita , libgee -, granite -, gtk3 +, granite7 +, gtk4 , networkmanager , networkmanagerapplet -, libnma +, libnma-gtk4 , switchboard }: stdenv.mkDerivation rec { pname = "switchboard-plug-network"; - version = "2.5.0"; + version = "8.0.0"; src = fetchFromGitHub { owner = "elementary"; repo = pname; rev = version; - hash = "sha256-Dd7sZ66iyfuoHeQYrhlx9G9g4ylGq1IBlkTF5zFlVBQ="; + hash = "sha256-N/S4oO7wwOMJZhQeqAeLBOMEsJtoKItxmGhsLHMuOoM="; }; patches = [ @@ -42,11 +43,12 @@ stdenv.mkDerivation rec { ]; buildInputs = [ - granite - gtk3 + granite7 + gtk4 + libadwaita libgee networkmanager - libnma + libnma-gtk4 switchboard ]; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/network/fix-paths.patch b/pkgs/desktops/pantheon/apps/switchboard-plugs/network/fix-paths.patch index b99f59fb2684..48458ca226bb 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/network/fix-paths.patch +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/network/fix-paths.patch @@ -1,8 +1,8 @@ diff --git a/src/Views/VPNPage.vala b/src/Views/VPNPage.vala -index ba9dc22..a12871a 100644 +index 21488d1e..f9915e5d 100644 --- a/src/Views/VPNPage.vala +++ b/src/Views/VPNPage.vala -@@ -264,7 +264,7 @@ public class Network.VPNPage : Network.Widgets.Page { +@@ -279,7 +279,7 @@ public class Network.VPNPage : Network.Widgets.Page { private void try_connection_editor (string args) { try { var appinfo = AppInfo.create_from_commandline ( @@ -11,16 +11,38 @@ index ba9dc22..a12871a 100644 null, GLib.AppInfoCreateFlags.NONE ); -diff --git a/src/Widgets/SettingsButton.vala b/src/Widgets/SettingsButton.vala -index 5849b69..7bbd172 100644 ---- a/src/Widgets/SettingsButton.vala -+++ b/src/Widgets/SettingsButton.vala -@@ -55,7 +55,7 @@ public class Network.Widgets.SettingsButton : Gtk.Button { - clicked.connect (() => { +diff --git a/src/Widgets/Page.vala b/src/Widgets/Page.vala +index cbcc8357..c6276d5a 100644 +--- a/src/Widgets/Page.vala ++++ b/src/Widgets/Page.vala +@@ -189,7 +189,7 @@ namespace Network.Widgets { + protected void edit_connections () { try { var appinfo = AppInfo.create_from_commandline ( -- "nm-connection-editor %s".printf (args), null, AppInfoCreateFlags.NONE -+ "@networkmanagerapplet@/bin/nm-connection-editor %s".printf (args), null, AppInfoCreateFlags.NONE +- "nm-connection-editor", null, AppInfoCreateFlags.NONE ++ "@networkmanagerapplet@/bin/nm-connection-editor", null, AppInfoCreateFlags.NONE + ); + appinfo.launch (null, null); + } catch (Error e) { +@@ -200,7 +200,7 @@ namespace Network.Widgets { + protected void open_advanced_settings () { + try { + var appinfo = AppInfo.create_from_commandline ( +- "nm-connection-editor --edit=%s".printf (uuid), null, AppInfoCreateFlags.NONE ++ "@networkmanagerapplet@/bin/nm-connection-editor --edit=%s".printf (uuid), null, AppInfoCreateFlags.NONE ); appinfo.launch (null, null); +diff --git a/src/Widgets/VPN/VPNInfoDialog.vala b/src/Widgets/VPN/VPNInfoDialog.vala +index e647c43b..44ce61c6 100644 +--- a/src/Widgets/VPN/VPNInfoDialog.vala ++++ b/src/Widgets/VPN/VPNInfoDialog.vala +@@ -70,7 +70,7 @@ public class Network.Widgets.VPNInfoDialog : Granite.MessageDialog { + if (response == 1) { + try { + var appinfo = AppInfo.create_from_commandline ( +- "nm-connection-editor --edit=%s".printf (connection.get_uuid ()), ++ "@networkmanagerapplet@/bin/nm-connection-editor --edit=%s".printf (connection.get_uuid ()), + null, + GLib.AppInfoCreateFlags.NONE + );