3
0
Fork 0
forked from mirrors/nixpkgs

pantheon.switchboard-plug-about: 2.6.3 -> 6.0.1

This commit is contained in:
Bobby Rong 2021-07-16 23:02:01 +08:00
parent 2912d5927a
commit 0f4d3a87b4
No known key found for this signature in database
GPG key ID: ED07364437C91161
3 changed files with 49 additions and 50 deletions

View file

@ -1,6 +1,5 @@
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, nix-update-script
, pantheon
, substituteAll
@ -9,22 +8,24 @@
, pkg-config
, vala
, libgee
, libgtop
, libhandy
, granite
, gtk3
, switchboard
, pciutils
, elementary-feedback
, fwupd
, appstream
}:
stdenv.mkDerivation rec {
pname = "switchboard-plug-about";
version = "2.6.3";
version = "6.0.1";
src = fetchFromGitHub {
owner = "elementary";
repo = pname;
rev = version;
sha256 = "sha256-wis6wNEOOjPLUCT9vRRhMxbKHR2Y2nZArKogSF/FQv8=";
sha256 = "0c075ac7iqz4hqbp2ph0cwyhiq0jn6c1g1jjfhygjbssv3vvd268";
};
passthru = {
@ -41,32 +42,20 @@ stdenv.mkDerivation rec {
];
buildInputs = [
appstream
fwupd
granite
gtk3
libgee
libgtop
libhandy
switchboard
];
patches = [
# Get OS Info from GLib.Environment
# https://github.com/elementary/switchboard-plug-about/pull/128
(fetchpatch {
url = "https://github.com/elementary/switchboard-plug-about/commit/5ed29988e3a895b2df66e5529df0f12a94d5517c.patch";
sha256 = "1ipDxnpDZjpSEzZdtOeNe5U+QOXiB5M+hC3yDAsl/rQ=";
})
# Use Pretty Name
# https://github.com/elementary/switchboard-plug-about/pull/134
(fetchpatch {
url = "https://github.com/elementary/switchboard-plug-about/commit/653d131dc8fac10ae7523f2bf6b179ffffa9c0fd.patch";
sha256 = "AsM49Dc9/yn2tG6fqjfedeOlDXUu+iEoyNUmNYLH+zE=";
})
(substituteAll {
src = ./fix-paths.patch;
inherit pciutils;
elementary_feedback = elementary-feedback;
})
# The NixOS logo is not centered in the circular background and path
# to the background is hardcoded, we will drop the background.
./remove-logo-background.patch
];
meta = with lib; {

View file

@ -1,26 +0,0 @@
diff --git a/src/Plug.vala b/src/Plug.vala
index c32efcbe..0cdaeaca 100644
--- a/src/Plug.vala
+++ b/src/Plug.vala
@@ -178,7 +178,7 @@ public class About.Plug : Switchboard.Plug {
var bug_button = new Gtk.Button.with_label (_("Report a Problem"));
bug_button.clicked.connect (() => {
- var appinfo = new GLib.DesktopAppInfo ("io.elementary.feedback.desktop");
+ var appinfo = new GLib.DesktopAppInfo ("@elementary_feedback@/bin/io.elementary.feedback.desktop");
if (appinfo != null) {
try {
appinfo.launch (null, null);
diff --git a/src/Views/HardwareView.vala b/src/Views/HardwareView.vala
index f8113634..3794bad8 100644
--- a/src/Views/HardwareView.vala
+++ b/src/Views/HardwareView.vala
@@ -179,7 +179,7 @@ public class About.HardwareView : Gtk.Grid {
// Graphics
try {
- Process.spawn_command_line_sync ("lspci", out graphics);
+ Process.spawn_command_line_sync ("@pciutils@/bin/lspci", out graphics);
if ("VGA" in graphics) { //VGA-keyword indicates graphics-line
string[] lines = graphics.split("\n");

View file

@ -0,0 +1,36 @@
diff --git a/src/Views/OperatingSystemView.vala b/src/Views/OperatingSystemView.vala
index fdb92e7..87bb3a4 100644
--- a/src/Views/OperatingSystemView.vala
+++ b/src/Views/OperatingSystemView.vala
@@ -39,21 +39,6 @@ public class About.OperatingSystemView : Gtk.Grid {
logo_icon_name = "distributor-logo";
}
- var logo = new Hdy.Avatar (128, "", false) {
- // In case the wallpaper can't be loaded, we don't want an icon or text
- icon_name = "invalid-icon-name",
- // We need this for the shadow to not get clipped by Gtk.Overlay
- margin = 6
- };
- logo.set_image_load_func ((size) => {
- try {
- return new Gdk.Pixbuf.from_file_at_scale ("/usr/share/backgrounds/elementaryos-default", -1, size, true);
- } catch (Error e) {
- critical (e.message);
- }
- });
- logo.get_style_context ().add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
-
var icon = new Gtk.Image () {
icon_name = logo_icon_name + "-symbolic",
// 128 minus 3px padding on each side
@@ -65,8 +50,7 @@ public class About.OperatingSystemView : Gtk.Grid {
icon_style_context.add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
var logo_overlay = new Gtk.Overlay ();
- logo_overlay.add (logo);
- logo_overlay.add_overlay (icon);
+ logo_overlay.add (icon);
// Intentionally not using GLib.OsInfoKey.PRETTY_NAME here because we
// want more granular control over text formatting