pantheon.elementary-files: drop filechooser-portal-hardcode-gsettings-for-nixos.patch

This commit is contained in:
Bobby Rong 2021-11-30 15:38:11 +08:00
parent 94d1b0d541
commit 0a989ec7ca
No known key found for this signature in database
GPG Key ID: ED07364437C91161
2 changed files with 1 additions and 31 deletions

View File

@ -67,6 +67,7 @@ stdenv.mkDerivation rec {
bamf
elementary-dock
elementary-icon-theme
glib
granite
gtk3
libcanberra
@ -82,16 +83,9 @@ stdenv.mkDerivation rec {
zeitgeist
];
patches = [
./filechooser-portal-hardcode-gsettings-for-nixos.patch
];
postPatch = ''
chmod +x meson/post_install.py
patchShebangs meson/post_install.py
substituteInPlace filechooser-portal/FileChooserDialog.vala \
--subst-var-by ELEMENTARY_FILES_GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"}
'';
meta = with lib; {

View File

@ -1,24 +0,0 @@
From 256d80aa2ab2b84316260d0be5263b02fd5e796f Mon Sep 17 00:00:00 2001
From: Bobby Rong <rjl931189261@126.com>
Date: Tue, 30 Nov 2021 10:24:39 +0800
Subject: [PATCH] filechooser-portal: hardcode gsettings for nixos
---
filechooser-portal/FileChooserDialog.vala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/filechooser-portal/FileChooserDialog.vala b/filechooser-portal/FileChooserDialog.vala
index 4a84016db..4bf2b32a1 100755
--- a/filechooser-portal/FileChooserDialog.vala
+++ b/filechooser-portal/FileChooserDialog.vala
@@ -160,7 +160,9 @@ public class Files.FileChooserDialog : Hdy.Window, Xdp.Request {
accept_button.grab_default ();
setup_chooser ();
- var settings = new Settings ("io.elementary.files.file-chooser");
+ SettingsSchemaSource sss = new SettingsSchemaSource.from_directory ("@ELEMENTARY_FILES_GSETTINGS_PATH@", SettingsSchemaSource.get_default (), true);
+ SettingsSchema chooser_schema = sss.lookup ("io.elementary.files.file-chooser", false);
+ var settings = new Settings.full (chooser_schema, null, null);
int width, height;
settings.get ("window-size", "(ii)", out width, out height);