From 58c1d1c25d138c0b154e074c2c5b667551ac5239 Mon Sep 17 00:00:00 2001 From: infirit Date: Tue, 8 Sep 2015 14:37:51 +0200 Subject: Rework gsettings schema building * Bump intltool required version for gsettings support * Extract strings with intltool directly * Let autoconf generate the xml files --- Makefile.am | 16 ++---- configure.ac | 4 +- org.mate.sensors-applet.gschema.xml.in | 40 ++++++++++++++ org.mate.sensors-applet.gschema.xml.in.in | 40 -------------- org.mate.sensors-applet.sensor.gschema.xml.in | 68 ++++++++++++++++++++++++ org.mate.sensors-applet.sensor.gschema.xml.in.in | 68 ------------------------ po/POTFILES.in | 4 +- 7 files changed, 118 insertions(+), 122 deletions(-) create mode 100644 org.mate.sensors-applet.gschema.xml.in delete mode 100644 org.mate.sensors-applet.gschema.xml.in.in create mode 100644 org.mate.sensors-applet.sensor.gschema.xml.in delete mode 100644 org.mate.sensors-applet.sensor.gschema.xml.in.in diff --git a/Makefile.am b/Makefile.am index 7949bdf..dd042b0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,29 +26,23 @@ org.mate.panel.applet.SensorsAppletFactory.service: $(service_in_files) $< > $@ @INTLTOOL_XML_NOMERGE_RULE@ -gsettings_SCHEMAS = \ - org.mate.sensors-applet.gschema.xml \ - org.mate.sensors-applet.sensor.gschema.xml +gsettingsschema_in_files = \ + org.mate.sensors-applet.gschema.xml.in \ + org.mate.sensors-applet.sensor.gschema.xml.in -gsettings_SCHEMAS_in_in = $(gsettings_SCHEMAS:.xml=.xml.in.in) +gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml) @GSETTINGS_RULES@ -%.gschema.xml.in: %.gschema.xml.in.in Makefile - $(AM_V_GEN) $(SED) \ - -e 's^\@GETTEXT_PACKAGE\@^$(GETTEXT_PACKAGE)^g' \ - < $< > $@ - CLEANFILES = $(applet_DATA) \ $(applet_DATA).in \ $(service_DATA) \ - $(gsettings_SCHEMAS_in) \ $(gsettings_SCHEMAS) \ *.gschema.valid EXTRA_DIST = $(ui_DATA) \ $(applet_in_files).in \ $(service_in_files) \ - $(gsettings_SCHEMAS_in_in) \ + $(gsettingsschema_in_files) \ autogen.sh DISTCLEANFILES = intltool-extract \ diff --git a/configure.ac b/configure.ac index 377e38f..665d13b 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ GETTEXT_PACKAGE=mate-sensors-applet AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE") AC_SUBST(GETTEXT_PACKAGE) AM_GLIB_GNU_GETTEXT -IT_PROG_INTLTOOL +IT_PROG_INTLTOOL([0.50.1]) # ========== export compiler / linker options ======== # AC_SUBST(CFLAGS) @@ -280,6 +280,8 @@ AC_SUBST(PLUGIN_LIBTOOL_FLAGS) # ================= generate files =================== # AC_CONFIG_FILES([ Makefile + org.mate.sensors-applet.gschema.xml + org.mate.sensors-applet.sensor.gschema.xml sensors-applet/Makefile lib/Makefile plugins/Makefile diff --git a/org.mate.sensors-applet.gschema.xml.in b/org.mate.sensors-applet.gschema.xml.in new file mode 100644 index 0000000..0292c00 --- /dev/null +++ b/org.mate.sensors-applet.gschema.xml.in @@ -0,0 +1,40 @@ + + + + 0 + Font size in points + + + false + Specify if show or hide sensor units + + + 1 + Set if display icons or text labels + + + 0 + Set value beside or below label + + + 1 + Show temperature in Kelvin, Celsius or Fahrenheit + + + true + Whether to display notifications + + + 2000 + Delay (in ms) between refreshes + + + 42 + The size of the graph in pixels (width if horizontal, height if vertical) + + + [] + List of sensors + + + diff --git a/org.mate.sensors-applet.gschema.xml.in.in b/org.mate.sensors-applet.gschema.xml.in.in deleted file mode 100644 index bd905ad..0000000 --- a/org.mate.sensors-applet.gschema.xml.in.in +++ /dev/null @@ -1,40 +0,0 @@ - - - - 0 - <_summary>Font size in points - - - false - <_summary>Specify if show or hide sensor units - - - 1 - <_summary>Set if display icons or text labels - - - 0 - <_summary>Set value beside or below label - - - 1 - <_summary>Show temperature in Kelvin, Celsius or Fahrenheit - - - true - <_summary>Whether to display notifications - - - 2000 - <_summary>Delay (in ms) between refreshes - - - 42 - <_summary>The size of the graph in pixels (width if horizontal, height if vertical) - - - [] - <_summary>List of sensors - - - diff --git a/org.mate.sensors-applet.sensor.gschema.xml.in b/org.mate.sensors-applet.sensor.gschema.xml.in new file mode 100644 index 0000000..abc1367 --- /dev/null +++ b/org.mate.sensors-applet.sensor.gschema.xml.in @@ -0,0 +1,68 @@ + + + + '' + Path to filename + + + '' + Sensor device ids + + + '' + The sensor device interface + + + '' + User defined label + + + true + Whether a sensor is enabled or not + + + 0 + Low value + + + 0 + High value + + + false + Whether the sensor has its alarm enabled + + + '' + Command to execute when the alarm is activated + + + '' + Command to execute when the alarm is activated + + + 0 + How often each alarm should be sounded (in seconds) + + + 0 + Used to identify a sensor in a list + + + 1 + Multiplier + + + 0 + Offset + + + 0 + Icon type + + + '#ff0000' + Color of the graph for the sensor + + + diff --git a/org.mate.sensors-applet.sensor.gschema.xml.in.in b/org.mate.sensors-applet.sensor.gschema.xml.in.in deleted file mode 100644 index dc8bb8b..0000000 --- a/org.mate.sensors-applet.sensor.gschema.xml.in.in +++ /dev/null @@ -1,68 +0,0 @@ - - - - '' - <_summary>Path to filename - - - '' - <_summary>Sensor device ids - - - '' - <_summary>The sensor device interface - - - '' - <_summary>User defined label - - - true - <_summary>Whether a sensor is enabled or not - - - 0 - <_summary>Low value - - - 0 - <_summary>High value - - - false - <_summary>Whether the sensor has its alarm enabled - - - '' - <_summary>Command to execute when the alarm is activated - - - '' - <_summary>Command to execute when the alarm is activated - - - 0 - <_summary>How often each alarm should be sounded (in seconds) - - - 0 - <_summary>Used to identify a sensor in a list - - - 1 - <_summary>Multiplier - - - 0 - <_summary>Offset - - - 0 - <_summary>Icon type - - - '#ff0000' - <_summary>Color of the graph for the sensor - - - diff --git a/po/POTFILES.in b/po/POTFILES.in index 36556b2..c15ada3 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,6 +1,6 @@ org.mate.applets.sensors-applet.mate-panel-applet.in.in -org.mate.sensors-applet.gschema.xml.in.in -org.mate.sensors-applet.sensor.gschema.xml.in.in +[type: gettext/gsettings]org.mate.sensors-applet.gschema.xml.in +[type: gettext/gsettings]org.mate.sensors-applet.sensor.gschema.xml.in plugins/pmu-sys/pmu-sys-plugin.c plugins/i2c-sys/i2c-sys-plugin.c plugins/i8k/i8k-plugin.c -- cgit v1.2.1