From 4b64a23f2613bda128a301a56c7112fed2dd2674 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 3 Sep 2020 19:45:07 -0400 Subject: [PATCH] pantheon.elementary-files: 4.4.4 -> 4.5.0 https://github.com/elementary/files/releases/tag/4.5.0 --- ...-module-hardcode-gsettings-for-nixos.patch | 35 +++++++++++++++++++ .../apps/elementary-files/default.nix | 6 ++-- .../elementary-files/hardcode-gsettings.patch | 22 ------------ 3 files changed, 38 insertions(+), 25 deletions(-) create mode 100644 pkgs/desktops/pantheon/apps/elementary-files/0001-filechooser-module-hardcode-gsettings-for-nixos.patch delete mode 100644 pkgs/desktops/pantheon/apps/elementary-files/hardcode-gsettings.patch diff --git a/pkgs/desktops/pantheon/apps/elementary-files/0001-filechooser-module-hardcode-gsettings-for-nixos.patch b/pkgs/desktops/pantheon/apps/elementary-files/0001-filechooser-module-hardcode-gsettings-for-nixos.patch new file mode 100644 index 000000000000..9bcedac3f035 --- /dev/null +++ b/pkgs/desktops/pantheon/apps/elementary-files/0001-filechooser-module-hardcode-gsettings-for-nixos.patch @@ -0,0 +1,35 @@ +From f51974c9736c3e28755245d15729578214652343 Mon Sep 17 00:00:00 2001 +Message-Id: +From: worldofpeace +Date: Thu, 3 Sep 2020 20:08:15 -0400 +Subject: [PATCH] filechooser-module: hardcode gsettings for nixos + +--- + filechooser-module/FileChooserDialog.vala | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/filechooser-module/FileChooserDialog.vala b/filechooser-module/FileChooserDialog.vala +index a70fe10..08fde2c 100644 +--- a/filechooser-module/FileChooserDialog.vala ++++ b/filechooser-module/FileChooserDialog.vala +@@ -60,10 +60,14 @@ public class CustomFileChooserDialog : Object { + /* If not local only during creation, strange bug occurs on fresh installs */ + chooser_dialog.local_only = true; + +- var files_preferences = new Settings ("io.elementary.files.preferences"); ++ SettingsSchemaSource sss = new SettingsSchemaSource.from_directory ("@ELEMENTARY_FILES_GSETTINGS_PATH@", SettingsSchemaSource.get_default (), true); ++ SettingsSchema preferences_schema = sss.lookup ("io.elementary.files.preferences", false); ++ SettingsSchema chooser_schema = sss.lookup ("io.elementary.files.file-chooser", false); ++ ++ var files_preferences = new Settings.full (preferences_schema, null, null); + is_single_click = files_preferences.get_boolean ("single-click"); + +- var chooser_settings = new Settings ("io.elementary.files.file-chooser"); ++ var chooser_settings = new Settings.full (chooser_schema, null, null); + + assign_container_box (); + remove_gtk_widgets (); + +base-commit: 57cb89b64fd2d5c08f4aaf23e8c74bfaa5d0384f +-- +git-series 0.9.1 diff --git a/pkgs/desktops/pantheon/apps/elementary-files/default.nix b/pkgs/desktops/pantheon/apps/elementary-files/default.nix index f6215e5025b2..4d1d9eae2609 100644 --- a/pkgs/desktops/pantheon/apps/elementary-files/default.nix +++ b/pkgs/desktops/pantheon/apps/elementary-files/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { pname = "elementary-files"; - version = "4.4.4"; + version = "4.5.0"; repoName = "files"; @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { owner = "elementary"; repo = repoName; rev = version; - sha256 = "1hsh9kg30l90r2aqrrap1nfmgjf0la8mfd8h4xm6d7acailcnhmb"; + sha256 = "sha256-wtQW1poX791DAlSFdVV9psnCfBDeVXI2fDZ2GcvvNn8="; }; passthru = { @@ -81,7 +81,7 @@ stdenv.mkDerivation rec { ]; patches = [ - ./hardcode-gsettings.patch + ./0001-filechooser-module-hardcode-gsettings-for-nixos.patch ]; postPatch = '' diff --git a/pkgs/desktops/pantheon/apps/elementary-files/hardcode-gsettings.patch b/pkgs/desktops/pantheon/apps/elementary-files/hardcode-gsettings.patch deleted file mode 100644 index 3191f4e3cb2b..000000000000 --- a/pkgs/desktops/pantheon/apps/elementary-files/hardcode-gsettings.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/filechooser-module/FileChooserDialog.vala b/filechooser-module/FileChooserDialog.vala -index cb7c3c49..8b1899d1 100644 ---- a/filechooser-module/FileChooserDialog.vala -+++ b/filechooser-module/FileChooserDialog.vala -@@ -57,10 +57,15 @@ public class CustomFileChooserDialog : Object { - chooser_dialog.deletable = false; - chooser_dialog.local_only = false; - -- var settings = new Settings ("io.elementary.files.preferences"); -+ SettingsSchemaSource sss = new SettingsSchemaSource.from_directory ("@ELEMENTARY_FILES_GSETTINGS_PATH@", SettingsSchemaSource.get_default (), true); -+ SettingsSchema preferences_schema = sss.lookup ("io.elementary.files.preferences", false); -+ SettingsSchema chooser_schema = sss.lookup ("io.elementary.files.file-chooser", false); -+ -+ var settings = new Settings.full (preferences_schema, null, null); -+ - is_single_click = settings.get_boolean ("single-click"); - -- var chooser_settings = new Settings ("io.elementary.files.file-chooser"); -+ var chooser_settings = new Settings.full (chooser_schema, null, null); - - assign_container_box (); - remove_gtk_widgets ();