Merge pull request #157289: more pantheon cleanups

This commit is contained in:
Bobby Rong 2022-01-30 21:30:37 +08:00 committed by GitHub
commit 6e7dc325f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 198 additions and 147 deletions

View File

@ -5,7 +5,6 @@
, appstream-glib
, dbus
, desktop-file-utils
, elementary-gtk-theme
, elementary-icon-theme
, fetchFromGitHub
, flatpak
@ -61,7 +60,6 @@ stdenv.mkDerivation rec {
buildInputs = [
appstream
elementary-gtk-theme
elementary-icon-theme
flatpak
glib

View File

@ -1,7 +1,6 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, nix-update-script
, pkg-config
, meson

View File

@ -2,28 +2,26 @@
, stdenv
, fetchFromGitHub
, nix-update-script
, pkg-config
, appstream-glib
, desktop-file-utils
, meson
, ninja
, pkg-config
, python3
, vala
, desktop-file-utils
, gtk3
, wrapGAppsHook
, clutter
, elementary-icon-theme
, evolution-data-server
, folks
, geoclue2
, geocode-glib
, granite
, gtk3
, libchamplain
, libgee
, libhandy
, geoclue2
, libchamplain
, clutter
, folks
, geocode-glib
, python3
, libnotify
, libical
, libgdata
, evolution-data-server
, appstream-glib
, elementary-icon-theme
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
@ -61,7 +59,6 @@ stdenv.mkDerivation rec {
libgee
libhandy
libical
libnotify
];
postPatch = ''

View File

@ -3,25 +3,24 @@
, fetchFromGitHub
, fetchpatch
, nix-update-script
, pkg-config
, meson
, ninja
, vala
, appstream
, desktop-file-utils
, python3
, gettext
, libxml2
, gtk3
, meson
, ninja
, pkg-config
, python3
, vala
, wrapGAppsHook
, elementary-icon-theme
, glib
, granite
, gst_all_1
, gtk3
, libcanberra
, libgee
, libhandy
, gst_all_1
, libcanberra
, clutter-gtk
, clutter-gst
, elementary-icon-theme
, appstream
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
@ -58,19 +57,22 @@ stdenv.mkDerivation rec {
];
buildInputs = [
clutter-gst
clutter-gtk
elementary-icon-theme
glib
granite
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
(gst_all_1.gst-plugins-good.override { gtkSupport = true; })
gst_all_1.gstreamer
gtk3
libcanberra
libgee
libhandy
];
] ++ (with gst_all_1; [
gst-plugins-bad
gst-plugins-base
# gtkSupport needed for gtksink
# https://github.com/elementary/camera/issues/181
(gst-plugins-good.override { gtkSupport = true; })
gst-plugins-ugly
gstreamer
]);
postPatch = ''
chmod +x meson/post_install.py

View File

@ -3,29 +3,28 @@
, fetchFromGitHub
, fetchpatch
, nix-update-script
, pkg-config
, appstream
, desktop-file-utils
, meson
, ninja
, vala
, pkg-config
, polkit
, python3
, desktop-file-utils
, gtk3
, granite
, libgee
, libhandy
, elementary-icon-theme
, appstream
, libpeas
, vala
, wrapGAppsHook
, editorconfig-core-c
, elementary-icon-theme
, granite
, gtk3
, gtksourceview4
, gtkspell3
, libgee
, libgit2-glib
, libhandy
, libpeas
, libsoup
, vte
, webkitgtk
, ctags
, libgit2-glib
, wrapGAppsHook
, polkit
}:
stdenv.mkDerivation rec {
@ -61,7 +60,6 @@ stdenv.mkDerivation rec {
];
buildInputs = [
ctags
editorconfig-core-c
elementary-icon-theme
granite
@ -74,7 +72,6 @@ stdenv.mkDerivation rec {
libpeas
libsoup
vte
webkitgtk
];
# ctags needed in path by outline plugin

View File

@ -14,7 +14,6 @@
, libgee
, libhandy
, elementary-icon-theme
, elementary-gtk-theme
, gettext
, wrapGAppsHook
, appstream
@ -55,7 +54,6 @@ stdenv.mkDerivation rec {
elementary-icon-theme
granite
gtk3
elementary-gtk-theme
libgee
libhandy
glib

View File

@ -20,7 +20,6 @@
, elementary-dock
, bamf
, sqlite
, libdbusmenu-gtk3
, zeitgeist
, glib-networking
, elementary-icon-theme
@ -64,7 +63,6 @@ stdenv.mkDerivation rec {
gtk3
libcanberra
libcloudproviders
libdbusmenu-gtk3
libgee
libgit2-glib
libhandy

View File

@ -3,31 +3,25 @@
, fetchFromGitHub
, fetchpatch
, nix-update-script
, pkg-config
, desktop-file-utils
, meson
, ninja
, vala
, desktop-file-utils
, gtk3
, granite
, pkg-config
, python3
, libgee
, clutter-gtk
, json-glib
, vala
, wrapGAppsHook
, elementary-icon-theme
, glib
, granite
, gst_all_1
, gtk3
, libgda
, libgee
, libgpod
, libhandy
, libnotify
, libpeas
, libsoup
, zeitgeist
, gst_all_1
, taglib
, libdbusmenu
, libsignon-glib
, libaccounts-glib
, elementary-icon-theme
, wrapGAppsHook
, zeitgeist
}:
stdenv.mkDerivation rec {
@ -66,34 +60,25 @@ stdenv.mkDerivation rec {
wrapGAppsHook
];
buildInputs = with gst_all_1; [
clutter-gtk
buildInputs = [
elementary-icon-theme
glib
granite
gtk3
libgda
libgee
libgpod
libhandy
libpeas
taglib
zeitgeist
] ++ (with gst_all_1; [
gst-plugins-bad
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
gstreamer
gtk3
json-glib
libaccounts-glib
libdbusmenu
libgda
libgee
libgpod
libhandy
libnotify
libpeas
libsignon-glib
libsoup
taglib
zeitgeist
];
mesonFlags = [
"-Dplugins=audioplayer,cdrom,ipod"
];
]);
postPatch = ''
chmod +x meson/post_install.py

View File

@ -8,7 +8,6 @@
, vala
, desktop-file-utils
, gtk3
, libaccounts-glib
, libexif
, libgee
, libhandy
@ -24,7 +23,6 @@
, libsoup
, sqlite
, python3
, scour
, webkitgtk
, libwebp
, appstream
@ -54,19 +52,13 @@ stdenv.mkDerivation rec {
wrapGAppsHook
];
buildInputs = with gst_all_1; [
buildInputs = [
elementary-icon-theme
geocode-glib
gexiv2
granite
gst-plugins-bad
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
gstreamer
gtk3
json-glib
libaccounts-glib
libexif
libgee
libgphoto2
@ -76,10 +68,15 @@ stdenv.mkDerivation rec {
librest
libsoup
libwebp
scour
sqlite
webkitgtk
];
] ++ (with gst_all_1; [
gst-plugins-bad
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
gstreamer
]);
mesonFlags = [
"-Dplugins=false"

View File

@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Screenshot tool designed for elementary OS";
homepage = "https://github.com/elementary/screenshot";
license = licenses.lgpl3;
license = licenses.lgpl3Plus;
platforms = platforms.linux;
maintainers = teams.pantheon.members;
mainProgram = "io.elementary.screenshot";

View File

@ -86,7 +86,7 @@ stdenv.mkDerivation rec {
smart copy/paste, and little to no configuration.
'';
homepage = "https://github.com/elementary/terminal";
license = licenses.lgpl3;
license = licenses.lgpl3Plus;
platforms = platforms.linux;
maintainers = teams.pantheon.members;
mainProgram = "io.elementary.terminal";

View File

@ -2,7 +2,6 @@
, stdenv
, desktop-file-utils
, nix-update-script
, elementary-gtk-theme
, elementary-icon-theme
, fetchFromGitHub
, flatpak
@ -44,7 +43,6 @@ stdenv.mkDerivation rec {
];
buildInputs = [
elementary-gtk-theme
elementary-icon-theme
flatpak
glib

View File

@ -0,0 +1,82 @@
From cc47fa33893e6840463ef8d59f9f4de4b7563726 Mon Sep 17 00:00:00 2001
From: Bobby Rong <rjl931189261@126.com>
Date: Sat, 4 Dec 2021 22:00:38 +0800
Subject: [PATCH] Add meson option for overlaying logo on wallpaper
---
meson.build | 8 ++++++++
meson_options.txt | 1 +
src/Views/OperatingSystemView.vala | 8 ++++++++
3 files changed, 17 insertions(+)
create mode 100644 meson_options.txt
diff --git a/meson.build b/meson.build
index 2125de6e..cbe3cadd 100644
--- a/meson.build
+++ b/meson.build
@@ -20,6 +20,14 @@ add_project_arguments(
vapi_dir = join_paths(meson.current_source_dir(), 'vapi')
add_project_arguments(['--vapidir', vapi_dir], language: 'vala')
+vala_flags = []
+
+if get_option('wallpaper')
+ vala_flags += ['--define', 'WALLPAPER']
+endif
+
+add_project_arguments(vala_flags, language: 'vala')
+
subdir('data')
subdir('src')
subdir('po')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 00000000..8cef0bb3
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1 @@
+option('wallpaper', type : 'boolean', value : true, description : 'Overlay logo on default wallpaper')
diff --git a/src/Views/OperatingSystemView.vala b/src/Views/OperatingSystemView.vala
index fdb92e7e..6110d1aa 100644
--- a/src/Views/OperatingSystemView.vala
+++ b/src/Views/OperatingSystemView.vala
@@ -39,6 +39,7 @@ public class About.OperatingSystemView : Gtk.Grid {
logo_icon_name = "distributor-logo";
}
+#if WALLPAPER
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",
@@ -53,6 +54,7 @@ public class About.OperatingSystemView : Gtk.Grid {
}
});
logo.get_style_context ().add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+#endif
var icon = new Gtk.Image () {
icon_name = logo_icon_name + "-symbolic",
@@ -64,9 +66,11 @@ public class About.OperatingSystemView : Gtk.Grid {
icon_style_context.add_class ("logo");
icon_style_context.add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+#if WALLPAPER
var logo_overlay = new Gtk.Overlay ();
logo_overlay.add (logo);
logo_overlay.add_overlay (icon);
+#endif
// Intentionally not using GLib.OsInfoKey.PRETTY_NAME here because we
// want more granular control over text formatting
@@ -145,7 +149,11 @@ public class About.OperatingSystemView : Gtk.Grid {
valign = Gtk.Align.CENTER,
vexpand = true
};
+#if WALLPAPER
software_grid.attach (logo_overlay, 0, 0, 1, 4);
+#else
+ software_grid.attach (icon, 0, 0, 1, 4);
+#endif
software_grid.attach (title, 1, 0, 3);
software_grid.attach (kernel_version_label, 1, 2, 3);

View File

@ -2,7 +2,6 @@
, stdenv
, fetchFromGitHub
, nix-update-script
, substituteAll
, meson
, ninja
, pkg-config
@ -15,7 +14,6 @@
, switchboard
, fwupd
, appstream
, nixos-artwork
}:
stdenv.mkDerivation rec {
@ -30,11 +28,10 @@ stdenv.mkDerivation rec {
};
patches = [
# Use NixOS's default wallpaper
(substituteAll {
src = ./fix-background-path.patch;
default_wallpaper = "${nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}";
})
# Introduces a wallpaper meson flag.
# The wallpapaper path does not exist on NixOS, let's just remove the wallpaper.
# https://github.com/elementary/switchboard-plug-about/pull/236
./add-wallpaper-option.patch
];
nativeBuildInputs = [
@ -55,6 +52,11 @@ stdenv.mkDerivation rec {
switchboard
];
mesonFlags = [
# This option is introduced in add-wallpaper-option.patch
"-Dwallpaper=false"
];
passthru = {
updateScript = nix-update-script {
attrPath = "pantheon.${pname}";

View File

@ -1,13 +0,0 @@
diff --git a/src/Views/OperatingSystemView.vala b/src/Views/OperatingSystemView.vala
index fdb92e7e..4161538e 100644
--- a/src/Views/OperatingSystemView.vala
+++ b/src/Views/OperatingSystemView.vala
@@ -47,7 +47,7 @@ public class About.OperatingSystemView : Gtk.Grid {
};
logo.set_image_load_func ((size) => {
try {
- return new Gdk.Pixbuf.from_file_at_scale ("/usr/share/backgrounds/elementaryos-default", -1, size, true);
+ return new Gdk.Pixbuf.from_file_at_scale ("@default_wallpaper@", -1, size, true);
} catch (Error e) {
critical (e.message);
}

View File

@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "GTK theme designed to be smooth, attractive, fast, and usable";
homepage = "https://github.com/elementary/stylesheet";
license = licenses.gpl3;
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.pantheon.members;
};

View File

@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
An original set of vector icons designed specifically for elementary OS and its desktop environment: Pantheon.
'';
homepage = "https://github.com/elementary/icons";
license = licenses.gpl3;
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.pantheon.members;
};

View File

@ -2,7 +2,6 @@
, runCommand
, mutter
, elementary-default-settings
, nixos-artwork
, glib
, gala
, epiphany

View File

@ -14,7 +14,6 @@
, granite
, libgee
, elementary-icon-theme
, elementary-gtk-theme
, elementary-settings-daemon
, gettext
, libhandy
@ -57,7 +56,6 @@ stdenv.mkDerivation rec {
];
buildInputs = [
elementary-gtk-theme
elementary-icon-theme
elementary-settings-daemon # settings schema
glib

View File

@ -1,13 +1,14 @@
{ lib
, stdenv
, fetchFromGitHub
, unstableGitUpdater
, substituteAll
, file-roller
}:
stdenv.mkDerivation rec {
pname = "file-roller-contract";
version = "unstable-2021-02-23";
version = "unstable-2021-02-22";
src = fetchFromGitHub {
owner = "elementary";
@ -36,6 +37,12 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
passthru = {
updateScript = unstableGitUpdater {
url = "https://github.com/elementary/file-roller-contract.git";
};
};
meta = with lib; {
description = "Contractor extension for File Roller";
homepage = "https://github.com/elementary/file-roller-contract";

View File

@ -1,13 +1,14 @@
{ lib
, stdenv
, fetchFromGitHub
, unstableGitUpdater
, substituteAll
, gnome-bluetooth
}:
stdenv.mkDerivation rec {
pname = "gnome-bluetooth-contract";
version = "unstable-2021-02-23";
version = "unstable-2021-02-22";
src = fetchFromGitHub {
owner = "elementary";
@ -36,6 +37,12 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
passthru = {
updateScript = unstableGitUpdater {
url = "https://github.com/elementary/gnome-bluetooth-contract.git";
};
};
meta = with lib; {
description = "Contractor extension for GNOME Bluetooth";
homepage = "https://github.com/elementary/gnome-bluetooth-contract";

View File

@ -1,7 +1,6 @@
{ lib
, stdenv
, fetchFromGitHub
, nix-update-script
, python3
, meson
, ninja
@ -18,7 +17,7 @@
stdenv.mkDerivation rec {
pname = "granite";
version = "6.2.0";
version = "6.2.0"; # nixpkgs-update: no auto update
outputs = [ "out" "dev" ];
@ -52,12 +51,6 @@ stdenv.mkDerivation rec {
patchShebangs meson/post_install.py
'';
passthru = {
updateScript = nix-update-script {
attrPath = "pantheon.${pname}";
};
};
meta = with lib; {
description = "An extension to GTK used by elementary OS";
longDescription = ''

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, unstableGitUpdater
, substituteAll
, meson
, ninja
@ -45,6 +46,12 @@ stdenv.mkDerivation rec {
pantheon.wingpanel
];
passthru = {
updateScript = unstableGitUpdater {
url = "https://github.com/Lafydev/wingpanel-indicator-ayatana.git";
};
};
meta = with lib; {
description = "Ayatana Compatibility Indicator for Wingpanel";
homepage = "https://github.com/Lafydev/wingpanel-indicator-ayatana";