Rework gsettings schema building

* Bump intltool required version for gsettings support
* Extract strings with intltool directly
* Let autoconf generate the xml files
This commit is contained in:
infirit 2015-09-08 17:19:30 +02:00
parent 3d9e640cc4
commit ca8ca6923e
7 changed files with 56 additions and 59 deletions

View File

@ -387,6 +387,7 @@ plugins/externaltools/Makefile
plugins/externaltools/scripts/Makefile plugins/externaltools/scripts/Makefile
plugins/externaltools/tools/Makefile plugins/externaltools/tools/Makefile
plugins/filebrowser/Makefile plugins/filebrowser/Makefile
plugins/filebrowser/org.mate.pluma.plugins.filebrowser.gschema.xml
plugins/modelines/Makefile plugins/modelines/Makefile
plugins/pythonconsole/Makefile plugins/pythonconsole/Makefile
plugins/pythonconsole/pythonconsole/Makefile plugins/pythonconsole/pythonconsole/Makefile
@ -400,6 +401,7 @@ plugins/sort/Makefile
plugins/spell/Makefile plugins/spell/Makefile
plugins/taglist/Makefile plugins/taglist/Makefile
plugins/time/Makefile plugins/time/Makefile
plugins/time/org.mate.pluma.plugins.time.gschema.xml
plugins/trailsave/Makefile plugins/trailsave/Makefile
po/Makefile.in po/Makefile.in
tests/Makefile tests/Makefile

View File

@ -66,17 +66,14 @@ pluma-file-browser-marshal.c: pluma-file-browser-marshal.list $(GLIB_GENMARSHAL)
plugin_DATA = $(plugin_in_files:.pluma-plugin.desktop.in=.pluma-plugin) plugin_DATA = $(plugin_in_files:.pluma-plugin.desktop.in=.pluma-plugin)
@INTLTOOL_XML_NOMERGE_RULE@ @INTLTOOL_XML_NOMERGE_RULE@
gsettings_SCHEMAS = org.mate.pluma.plugins.filebrowser.gschema.xml filebrowser_gschema_in = org.mate.pluma.plugins.filebrowser.gschema.xml.in
gsettings_SCHEMAS = $(filebrowser_gschema_in:.xml.in=.xml)
@GSETTINGS_RULES@ @GSETTINGS_RULES@
%.gschema.xml.in: %.gschema.xml.in.in Makefile
$(AM_V_GEN) $(SED) -e 's^\@GETTEXT_PACKAGE\@^$(GETTEXT_PACKAGE)^g' < $< > $@
EXTRA_DIST = \ EXTRA_DIST = \
$(ui_DATA) \ $(ui_DATA) \
$(plugin_in_files) \ $(plugin_in_files) \
$(gsettings_SCHEMAS).in.in \ $(filebrowser_gschema_in) \
pluma-file-browser-enum-types.h.template \ pluma-file-browser-enum-types.h.template \
pluma-file-browser-enum-types.c.template \ pluma-file-browser-enum-types.c.template \
pluma-file-browser-enum-register.c.template \ pluma-file-browser-enum-register.c.template \

View File

@ -0,0 +1,43 @@
<?xml version="1.0"?>
<schemalist>
<schema id="org.mate.pluma.plugins.filebrowser" path="/org/mate/pluma/plugins/filebrowser/">
<key name="open-at-first-doc" type="b">
<default>true</default>
<summary>Set Location to First Document</summary>
<description>If TRUE the file browser plugin will view the directory of the first opened document given that the file browser hasn't been used yet. (Thus this generally applies to opening a document from the command line or opening it with Caja, etc.)</description>
</key>
<key name="filter-mode" type="s">
<default>'hidden_and_binary'</default>
<summary>File Browser Filter Mode</summary>
<description>This value determines what files get filtered from the file browser. Valid values are: none (filter nothing), hidden (filter hidden files), binary (filter binary files) and hidden_and_binary (filter both hidden and binary files).</description>
</key>
<key name="filter-pattern" type="s">
<default>''</default>
<summary>File Browser Filter Pattern</summary>
<description>The filter pattern to filter the file browser with. This filter works on top of the filter_mode.</description>
</key>
<child name="on-load" schema="org.mate.pluma.plugins.filebrowser.on-load"/>
</schema>
<schema id="org.mate.pluma.plugins.filebrowser.on-load" path="/org/mate/pluma/plugins/filebrowser/on-load/">
<key name="tree-view" type="b">
<default>true</default>
<summary>Open With Tree View</summary>
<description>Open the tree view when the file browser plugin gets loaded instead of the bookmarks view</description>
</key>
<key name="root" type="s">
<default>''</default>
<summary>File Browser Root Directory</summary>
<description>The file browser root directory to use when loading the file browser plugin and onload/tree_view is TRUE.</description>
</key>
<key name="virtual-root" type="s">
<default>''</default>
<summary>File Browser Virtual Root Directory</summary>
<description>The file browser virtual root directory to use when loading the file browser plugin when onload/tree_view is TRUE. The virtual root must always be below the actual root.</description>
</key>
<key name="enable-remote" type="b">
<default>false</default>
<summary>Enable Restore of Remote Locations</summary>
<description>Sets whether to enable restoring of remote locations.</description>
</key>
</schema>
</schemalist>

View File

@ -1,43 +0,0 @@
<?xml version="1.0"?>
<schemalist>
<schema id="org.mate.pluma.plugins.filebrowser" path="/org/mate/pluma/plugins/filebrowser/">
<key name="open-at-first-doc" type="b">
<default>true</default>
<_summary>Set Location to First Document</_summary>
<_description>If TRUE the file browser plugin will view the directory of the first opened document given that the file browser hasn't been used yet. (Thus this generally applies to opening a document from the command line or opening it with Caja, etc.)</_description>
</key>
<key name="filter-mode" type="s">
<default>'hidden_and_binary'</default>
<_summary>File Browser Filter Mode</_summary>
<_description>This value determines what files get filtered from the file browser. Valid values are: none (filter nothing), hidden (filter hidden files), binary (filter binary files) and hidden_and_binary (filter both hidden and binary files).</_description>
</key>
<key name="filter-pattern" type="s">
<default>''</default>
<_summary>File Browser Filter Pattern</_summary>
<_description>The filter pattern to filter the file browser with. This filter works on top of the filter_mode.</_description>
</key>
<child name="on-load" schema="org.mate.pluma.plugins.filebrowser.on-load"/>
</schema>
<schema id="org.mate.pluma.plugins.filebrowser.on-load" path="/org/mate/pluma/plugins/filebrowser/on-load/">
<key name="tree-view" type="b">
<default>true</default>
<_summary>Open With Tree View</_summary>
<_description>Open the tree view when the file browser plugin gets loaded instead of the bookmarks view</_description>
</key>
<key name="root" type="s">
<default>''</default>
<_summary>File Browser Root Directory</_summary>
<_description>The file browser root directory to use when loading the file browser plugin and onload/tree_view is TRUE.</_description>
</key>
<key name="virtual-root" type="s">
<default>''</default>
<_summary>File Browser Virtual Root Directory</_summary>
<_description>The file browser virtual root directory to use when loading the file browser plugin when onload/tree_view is TRUE. The virtual root must always be below the actual root.</_description>
</key>
<key name="enable-remote" type="b">
<default>false</default>
<_summary>Enable Restore of Remote Locations</_summary>
<_description>Sets whether to enable restoring of remote locations.</_description>
</key>
</schema>
</schemalist>

View File

@ -28,13 +28,11 @@ plugin_in_files = time.pluma-plugin.desktop.in
plugin_DATA = $(plugin_in_files:.pluma-plugin.desktop.in=.pluma-plugin) plugin_DATA = $(plugin_in_files:.pluma-plugin.desktop.in=.pluma-plugin)
@INTLTOOL_XML_NOMERGE_RULE@ @INTLTOOL_XML_NOMERGE_RULE@
gsettings_SCHEMAS = org.mate.pluma.plugins.time.gschema.xml time_gschema_in = org.mate.pluma.plugins.time.gschema.xml.in
gsettings_SCHEMAS = $(time_gschema_in:.xml.in=.xml)
@GSETTINGS_RULES@ @GSETTINGS_RULES@
%.gschema.xml.in: %.gschema.xml.in.in Makefile EXTRA_DIST = $(ui_DATA) $(plugin_in_files) $(time_gschema_in)
$(AM_V_GEN) $(SED) -e 's^\@GETTEXT_PACKAGE\@^$(GETTEXT_PACKAGE)^g' < $< > $@
EXTRA_DIST = $(ui_DATA) $(plugin_in_files) $(gsettings_SCHEMAS).in.in
CLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS_in) $(gsettings_SCHEMASn) CLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS_in) $(gsettings_SCHEMASn)
DISTCLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS_in) $(gsettings_SCHEMAS) DISTCLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS_in) $(gsettings_SCHEMAS)

View File

@ -9,15 +9,15 @@
<schema id="org.mate.pluma.plugins.time" path="/org/mate/pluma/plugins/time/"> <schema id="org.mate.pluma.plugins.time" path="/org/mate/pluma/plugins/time/">
<key name="prompt-type" enum="org.mate.pluma.plugins.time.PromptType"> <key name="prompt-type" enum="org.mate.pluma.plugins.time.PromptType">
<default>'prompt-selected-format'</default> <default>'prompt-selected-format'</default>
<_summary>Prompt type</_summary> <summary>Prompt type</summary>
</key> </key>
<key name="selected-format" type="s"> <key name="selected-format" type="s">
<default>'%c'</default> <default>'%c'</default>
<_summary>Selected format</_summary> <summary>Selected format</summary>
</key> </key>
<key name="custom-format" type="s"> <key name="custom-format" type="s">
<default>'%d/%m/%Y %H:%M:%S'</default> <default>'%d/%m/%Y %H:%M:%S'</default>
<_summary>Custom format</_summary> <summary>Custom format</summary>
</key> </key>
</schema> </schema>
</schemalist> </schemalist>

View File

@ -64,7 +64,7 @@ plugins/externaltools/data/run-command.desktop.in
plugins/externaltools/data/search-recursive.desktop.in plugins/externaltools/data/search-recursive.desktop.in
plugins/externaltools/data/switch-c.desktop.in plugins/externaltools/data/switch-c.desktop.in
plugins/filebrowser/filebrowser.pluma-plugin.desktop.in plugins/filebrowser/filebrowser.pluma-plugin.desktop.in
plugins/filebrowser/org.mate.pluma.plugins.filebrowser.gschema.xml.in.in [type: gettext/gsettings]plugins/filebrowser/org.mate.pluma.plugins.filebrowser.gschema.xml.in
plugins/filebrowser/pluma-file-bookmarks-store.c plugins/filebrowser/pluma-file-bookmarks-store.c
plugins/filebrowser/pluma-file-browser-plugin.c plugins/filebrowser/pluma-file-browser-plugin.c
plugins/filebrowser/pluma-file-browser-store.c plugins/filebrowser/pluma-file-browser-store.c
@ -105,7 +105,7 @@ plugins/taglist/Latex.tags.xml.in
plugins/taglist/taglist.pluma-plugin.desktop.in plugins/taglist/taglist.pluma-plugin.desktop.in
plugins/taglist/XSLT.tags.xml.in plugins/taglist/XSLT.tags.xml.in
plugins/taglist/XUL.tags.xml.in plugins/taglist/XUL.tags.xml.in
plugins/time/org.mate.pluma.plugins.time.gschema.xml.in.in [type: gettext/gsettings]plugins/time/org.mate.pluma.plugins.time.gschema.xml.in
plugins/time/pluma-time-plugin.c plugins/time/pluma-time-plugin.c
plugins/time/time.pluma-plugin.desktop.in plugins/time/time.pluma-plugin.desktop.in
plugins/trailsave/trailsave.pluma-plugin.desktop.in plugins/trailsave/trailsave.pluma-plugin.desktop.in