Merge pull request #272691 from bobby285271/upd/cinnamon

cinnamon.cinnamon-screensaver: Update the pygobject 3.46 patch to use try/except
This commit is contained in:
Bobby Rong 2023-12-08 20:44:50 +08:00 committed by GitHub
commit b482c6ff1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 19 deletions

View file

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, pkg-config
, meson
, ninja
@ -38,8 +39,12 @@ stdenv.mkDerivation rec {
};
patches = [
# See https://github.com/linuxmint/cinnamon-screensaver/issues/446#issuecomment-1819580053
./fix-broken-theming-with-pygobject-3-46.patch
# Fix broken theming with pygobject >= 3.46.0
# https://github.com/linuxmint/cinnamon-screensaver/issues/446
(fetchpatch {
url = "https://github.com/linuxmint/cinnamon-screensaver/commit/37ab8ed18f35591f2bd99043f12c06d98b4527db.patch";
hash = "sha256-4YSithosyTLy8OFu6DEhLT4c+EGEg84EenTKAiBiWo4=";
})
];
nativeBuildInputs = [

View file

@ -1,17 +0,0 @@
diff --git a/src/cinnamon-screensaver-main.py b/src/cinnamon-screensaver-main.py
index 05b727c..a185159 100755
--- a/src/cinnamon-screensaver-main.py
+++ b/src/cinnamon-screensaver-main.py
@@ -139,9 +139,9 @@ class Main(Gtk.Application):
fallback_prov = Gtk.CssProvider()
- if fallback_prov.load_from_data(fallback_css.encode()):
- Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default(), fallback_prov, 600)
- Gtk.StyleContext.reset_widgets(Gdk.Screen.get_default())
+ fallback_prov.load_from_data(fallback_css.encode())
+ Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default(), fallback_prov, 600)
+ Gtk.StyleContext.reset_widgets(Gdk.Screen.get_default())
if __name__ == "__main__":
setproctitle.setproctitle('cinnamon-screensaver')