From ca8ca6923e74bb307bfe6c99c691399987eda7ed Mon Sep 17 00:00:00 2001 From: infirit Date: Tue, 8 Sep 2015 17:19:30 +0200 Subject: [PATCH] Rework gsettings schema building * Bump intltool required version for gsettings support * Extract strings with intltool directly * Let autoconf generate the xml files --- configure.ac | 2 + plugins/filebrowser/Makefile.am | 9 ++-- ...e.pluma.plugins.filebrowser.gschema.xml.in | 43 +++++++++++++++++++ ...luma.plugins.filebrowser.gschema.xml.in.in | 43 ------------------- plugins/time/Makefile.am | 8 ++-- ...rg.mate.pluma.plugins.time.gschema.xml.in} | 6 +-- po/POTFILES.in | 4 +- 7 files changed, 56 insertions(+), 59 deletions(-) create mode 100644 plugins/filebrowser/org.mate.pluma.plugins.filebrowser.gschema.xml.in delete mode 100644 plugins/filebrowser/org.mate.pluma.plugins.filebrowser.gschema.xml.in.in rename plugins/time/{org.mate.pluma.plugins.time.gschema.xml.in.in => org.mate.pluma.plugins.time.gschema.xml.in} (86%) diff --git a/configure.ac b/configure.ac index 9148265..9f70c1f 100644 --- a/configure.ac +++ b/configure.ac @@ -387,6 +387,7 @@ plugins/externaltools/Makefile plugins/externaltools/scripts/Makefile plugins/externaltools/tools/Makefile plugins/filebrowser/Makefile +plugins/filebrowser/org.mate.pluma.plugins.filebrowser.gschema.xml plugins/modelines/Makefile plugins/pythonconsole/Makefile plugins/pythonconsole/pythonconsole/Makefile @@ -400,6 +401,7 @@ plugins/sort/Makefile plugins/spell/Makefile plugins/taglist/Makefile plugins/time/Makefile +plugins/time/org.mate.pluma.plugins.time.gschema.xml plugins/trailsave/Makefile po/Makefile.in tests/Makefile diff --git a/plugins/filebrowser/Makefile.am b/plugins/filebrowser/Makefile.am index 2124904..3b494cd 100644 --- a/plugins/filebrowser/Makefile.am +++ b/plugins/filebrowser/Makefile.am @@ -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) @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@ -%.gschema.xml.in: %.gschema.xml.in.in Makefile - $(AM_V_GEN) $(SED) -e 's^\@GETTEXT_PACKAGE\@^$(GETTEXT_PACKAGE)^g' < $< > $@ - - EXTRA_DIST = \ $(ui_DATA) \ $(plugin_in_files) \ - $(gsettings_SCHEMAS).in.in \ + $(filebrowser_gschema_in) \ pluma-file-browser-enum-types.h.template \ pluma-file-browser-enum-types.c.template \ pluma-file-browser-enum-register.c.template \ diff --git a/plugins/filebrowser/org.mate.pluma.plugins.filebrowser.gschema.xml.in b/plugins/filebrowser/org.mate.pluma.plugins.filebrowser.gschema.xml.in new file mode 100644 index 0000000..cf5ada5 --- /dev/null +++ b/plugins/filebrowser/org.mate.pluma.plugins.filebrowser.gschema.xml.in @@ -0,0 +1,43 @@ + + + + + true + Set Location to First Document + 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.) + + + 'hidden_and_binary' + File Browser Filter Mode + 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). + + + '' + File Browser Filter Pattern + The filter pattern to filter the file browser with. This filter works on top of the filter_mode. + + + + + + true + Open With Tree View + Open the tree view when the file browser plugin gets loaded instead of the bookmarks view + + + '' + File Browser Root Directory + The file browser root directory to use when loading the file browser plugin and onload/tree_view is TRUE. + + + '' + File Browser Virtual Root Directory + 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. + + + false + Enable Restore of Remote Locations + Sets whether to enable restoring of remote locations. + + + diff --git a/plugins/filebrowser/org.mate.pluma.plugins.filebrowser.gschema.xml.in.in b/plugins/filebrowser/org.mate.pluma.plugins.filebrowser.gschema.xml.in.in deleted file mode 100644 index 4b128f9..0000000 --- a/plugins/filebrowser/org.mate.pluma.plugins.filebrowser.gschema.xml.in.in +++ /dev/null @@ -1,43 +0,0 @@ - - - - - true - <_summary>Set Location to First Document - <_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.) - - - 'hidden_and_binary' - <_summary>File Browser Filter Mode - <_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). - - - '' - <_summary>File Browser Filter Pattern - <_description>The filter pattern to filter the file browser with. This filter works on top of the filter_mode. - - - - - - true - <_summary>Open With Tree View - <_description>Open the tree view when the file browser plugin gets loaded instead of the bookmarks view - - - '' - <_summary>File Browser Root Directory - <_description>The file browser root directory to use when loading the file browser plugin and onload/tree_view is TRUE. - - - '' - <_summary>File Browser Virtual Root Directory - <_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. - - - false - <_summary>Enable Restore of Remote Locations - <_description>Sets whether to enable restoring of remote locations. - - - diff --git a/plugins/time/Makefile.am b/plugins/time/Makefile.am index 0c270b8..d1f8fe3 100755 --- a/plugins/time/Makefile.am +++ b/plugins/time/Makefile.am @@ -28,13 +28,11 @@ plugin_in_files = time.pluma-plugin.desktop.in plugin_DATA = $(plugin_in_files:.pluma-plugin.desktop.in=.pluma-plugin) @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@ -%.gschema.xml.in: %.gschema.xml.in.in Makefile - $(AM_V_GEN) $(SED) -e 's^\@GETTEXT_PACKAGE\@^$(GETTEXT_PACKAGE)^g' < $< > $@ - -EXTRA_DIST = $(ui_DATA) $(plugin_in_files) $(gsettings_SCHEMAS).in.in +EXTRA_DIST = $(ui_DATA) $(plugin_in_files) $(time_gschema_in) CLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS_in) $(gsettings_SCHEMASn) DISTCLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS_in) $(gsettings_SCHEMAS) diff --git a/plugins/time/org.mate.pluma.plugins.time.gschema.xml.in.in b/plugins/time/org.mate.pluma.plugins.time.gschema.xml.in similarity index 86% rename from plugins/time/org.mate.pluma.plugins.time.gschema.xml.in.in rename to plugins/time/org.mate.pluma.plugins.time.gschema.xml.in index d294cfe..b3567e9 100644 --- a/plugins/time/org.mate.pluma.plugins.time.gschema.xml.in.in +++ b/plugins/time/org.mate.pluma.plugins.time.gschema.xml.in @@ -9,15 +9,15 @@ 'prompt-selected-format' - <_summary>Prompt type + Prompt type '%c' - <_summary>Selected format + Selected format '%d/%m/%Y %H:%M:%S' - <_summary>Custom format + Custom format diff --git a/po/POTFILES.in b/po/POTFILES.in index 0bfed6b..143c2f0 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -64,7 +64,7 @@ plugins/externaltools/data/run-command.desktop.in plugins/externaltools/data/search-recursive.desktop.in plugins/externaltools/data/switch-c.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-browser-plugin.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/XSLT.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/time.pluma-plugin.desktop.in plugins/trailsave/trailsave.pluma-plugin.desktop.in