From 97e402b980789963afcb5d10a7c4005045475f3f Mon Sep 17 00:00:00 2001 From: Rowan Lewis Date: Fri, 16 Mar 2018 20:38:37 +0100 Subject: [PATCH 1/2] Added initial settings schema. --- hammond-gtk/resources/meson.build | 4 +- .../resources/org.gnome.Hammond.gschema.xml | 50 +++++++++++++++++++ scripts/compile-gschema.py | 10 ++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 hammond-gtk/resources/org.gnome.Hammond.gschema.xml create mode 100644 scripts/compile-gschema.py diff --git a/hammond-gtk/resources/meson.build b/hammond-gtk/resources/meson.build index 361872a..3904700 100644 --- a/hammond-gtk/resources/meson.build +++ b/hammond-gtk/resources/meson.build @@ -1,4 +1,6 @@ # subdir('icons') install_data('org.gnome.Hammond.desktop', install_dir : datadir + '/applications') -install_data('org.gnome.Hammond.appdata.xml', install_dir : datadir + '/appdata') \ No newline at end of file +install_data('org.gnome.Hammond.appdata.xml', install_dir : datadir + '/appdata') +install_data('org.gnome.Hammond.gschema.xml', install_dir: join_paths(datadir, 'glib-2.0', 'schemas')) +meson.add_install_script('../../scripts/compile-gschema.py') \ No newline at end of file diff --git a/hammond-gtk/resources/org.gnome.Hammond.gschema.xml b/hammond-gtk/resources/org.gnome.Hammond.gschema.xml new file mode 100644 index 0000000..16336c2 --- /dev/null +++ b/hammond-gtk/resources/org.gnome.Hammond.gschema.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + false + Enable or disable dark theme + + + + true + Wheather to periodically refresh content + + + + 1 + How many periods of time to wait between automatic refreshes + + + 'hours' + What period of time to wait between automatic refreshes + + + true + Wheather to refresh content after startup + + + + true + Wheather to periodically cleanup content + + + + 2 + How many periods of time to wait between automatic cleanups + + + 'days' + What period of time to wait between automatic cleanups + + + \ No newline at end of file diff --git a/scripts/compile-gschema.py b/scripts/compile-gschema.py new file mode 100644 index 0000000..9eaefa9 --- /dev/null +++ b/scripts/compile-gschema.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 + +import os +import subprocess + +schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas') + +if not os.environ.get('DESTDIR'): + print('Compiling gsettings schemas...') + subprocess.call(['glib-compile-schemas', schemadir]) \ No newline at end of file From 3886402f8eb70b24d4cc8aaa923c7fc9a7ec7133 Mon Sep 17 00:00:00 2001 From: Rowan Lewis Date: Fri, 16 Mar 2018 20:45:40 +0100 Subject: [PATCH 2/2] Spelling correction. --- hammond-gtk/resources/org.gnome.Hammond.gschema.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hammond-gtk/resources/org.gnome.Hammond.gschema.xml b/hammond-gtk/resources/org.gnome.Hammond.gschema.xml index 16336c2..4b572e0 100644 --- a/hammond-gtk/resources/org.gnome.Hammond.gschema.xml +++ b/hammond-gtk/resources/org.gnome.Hammond.gschema.xml @@ -17,7 +17,7 @@ true - Wheather to periodically refresh content + Whether to periodically refresh content @@ -30,12 +30,12 @@ true - Wheather to refresh content after startup + Whether to refresh content after startup true - Wheather to periodically cleanup content + Whether to periodically cleanup content