From 23191f045ddb7224fb2acd6f6d835a1c4d367980 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Mon, 18 Feb 2019 18:52:42 -0500 Subject: [PATCH] pantheon.granite: fetch for DateTime GSettings patch Typo in the patch was fixed. [0] [0]: https://src.fedoraproject.org/rpms/granite/c/0550b44ed6400c9b1ff7e70871913747df2ff323?branch=master --- .../02-datetime-clock-format-gsettings.patch | 129 ------------------ pkgs/desktops/pantheon/granite/default.nix | 5 +- 2 files changed, 4 insertions(+), 130 deletions(-) delete mode 100644 pkgs/desktops/pantheon/granite/02-datetime-clock-format-gsettings.patch diff --git a/pkgs/desktops/pantheon/granite/02-datetime-clock-format-gsettings.patch b/pkgs/desktops/pantheon/granite/02-datetime-clock-format-gsettings.patch deleted file mode 100644 index 7960e45582ca..000000000000 --- a/pkgs/desktops/pantheon/granite/02-datetime-clock-format-gsettings.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 61e0d02c054367007e156c9ac3a084dbd6de8278 Mon Sep 17 00:00:00 2001 -From: Fabio Valentini -Date: Fri, 15 Feb 2019 13:53:11 +0100 -Subject: [PATCH] DateTime: include "clock-format" gsettings key here - ---- - data/io.elementary.granite.gschema.xml | 15 +++++++++++++++ - data/meson.build | 4 ++++ - lib/DateTime.vala | 4 ++-- - meson.build | 11 +++++++++++ - meson/post_install.py | 5 +++++ - 5 files changed, 37 insertions(+), 2 deletions(-) - create mode 100644 data/io.elementary.granite.gschema.xml - create mode 100644 data/meson.build - -diff --git a/data/io.elementary.granite.gschema.xml b/data/io.elementary.granite.gschema.xml -new file mode 100644 -index 0000000..1540fb0 ---- /dev/null -+++ b/data/io.elementary.granite.gschema.xml -@@ -0,0 +1,15 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ "12h" -+ Whether the clock displays in 12h or 24h format -+ Whether the clock displays in 12h or 24h format -+ -+ -+ -diff --git a/data/meson.build b/data/meson.build -new file mode 100644 -index 0000000..96cc3b1 ---- /dev/null -+++ b/data/meson.build -@@ -0,0 +1,4 @@ -+install_data( -+ rdnn + '.gschema.xml', -+ install_dir: schema_dir -+) -diff --git a/lib/DateTime.vala b/lib/DateTime.vala -index 2069e1f..5e9075d 100644 ---- a/lib/DateTime.vala -+++ b/lib/DateTime.vala -@@ -104,13 +104,13 @@ namespace Granite.DateTime { - } - - /** -- * Gets the //clock-format// key from //org.gnome.desktop.interface// schema -+ * Gets the //clock-format// key from //io.elementary.granite// schema - * and determines if the clock format is 12h based - * - * @return true if the clock format is 12h based, false otherwise. - */ - private static bool is_clock_format_12h () { -- var h24_settings = new Settings ("io.elementary.desktop.wingpanel.datetime"); -+ var h24_settings = new Settings ("io.elementary.granite"); - var format = h24_settings.get_string ("clock-format"); - return (format.contains ("12h")); - } -diff --git a/meson.build b/meson.build -index 8c886be..5f95055 100644 ---- a/meson.build -+++ b/meson.build -@@ -5,6 +5,8 @@ project( - version: '5.2.3' - ) - -+rdnn = 'io.elementary.' + meson.project_name() -+ - if meson.get_compiler('vala').version().version_compare('<0.40.0') - error('vala compiler version 0.40.0 or newer is required.') - endif -@@ -53,10 +55,18 @@ icons_dir = join_paths( - 'hicolor' - ) - -+schema_dir = join_paths( -+ get_option('prefix'), -+ get_option('datadir'), -+ 'glib-2.0', -+ 'schemas' -+) -+ - pkgconfig = import('pkgconfig') - i18n = import('i18n') - - subdir('lib') -+subdir('data') - subdir('demo') - subdir('icons') - subdir('po') -@@ -69,5 +79,6 @@ endif - meson.add_install_script( - join_paths(meson.current_source_dir(), 'meson', 'post_install.py'), - '--iconsdir', icons_dir, -+ '--schemadir', schema_dir, - ) - -diff --git a/meson/post_install.py b/meson/post_install.py -index 1864515..5313f96 100755 ---- a/meson/post_install.py -+++ b/meson/post_install.py -@@ -6,11 +6,16 @@ import subprocess - - parser = argparse.ArgumentParser() - parser.add_argument("--iconsdir", action="store", required=True) -+parser.add_argument("--schemadir", action="store", required=True) - args = vars(parser.parse_args()) - - icons_dir = args["iconsdir"] -+schema_dir = args["schemadir"] - - if not os.environ.get('DESTDIR'): - print('Compiling icon cache ...') - subprocess.run(['gtk-update-icon-cache', icons_dir]) - -+ print('Compiling GSettings schemas ...') -+ subprocess.run(['glib-compile-schemas', schema_dir]) -+ --- -2.20.1 - diff --git a/pkgs/desktops/pantheon/granite/default.nix b/pkgs/desktops/pantheon/granite/default.nix index eae9aa4afcaf..66ba331ddcdc 100644 --- a/pkgs/desktops/pantheon/granite/default.nix +++ b/pkgs/desktops/pantheon/granite/default.nix @@ -14,7 +14,10 @@ stdenv.mkDerivation rec { patches = [ # Resolve the circular dependency between granite and the datetime wingpanel indicator # See: https://github.com/elementary/granite/pull/242 - ./02-datetime-clock-format-gsettings.patch + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/granite/raw/0550b44ed6400c9b1ff7e70871913747df2ff323/f/00-datetime-clock-format-gsettings.patch"; + sha256 = "0i9yvdmn77x5fjdwd1raw6ym8js8yxa7w6ydc7syx7hcyls00dmq"; + }) ]; passthru = {