Skip to content

Commit

Permalink
Rework gsettings schema building
Browse files Browse the repository at this point in the history
* Bump intltool required version for gsettings support
* Extract strings with intltool directly
* Let autoconf generate the xml files
  • Loading branch information
infirit committed Sep 8, 2015
1 parent 57026bf commit bcf861f
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 65 deletions.
15 changes: 6 additions & 9 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,19 @@ SUBDIRS += typing-break
endif

@INTLTOOL_XML_NOMERGE_RULE@
gsettings_SCHEMAS = \
org.mate.control-center.gschema.xml \
org.mate.control-center.keybinding.gschema.xml
@GSETTINGS_RULES@
gsettingsschema_in_files = \
org.mate.control-center.gschema.xml.in \
org.mate.control-center.keybinding.gschema.xml.in

%.gschema.xml.in: %.gschema.xml.in.in Makefile
$(AM_V_GEN) $(SED) -e 's^\@GETTEXT_PACKAGE\@^$(GETTEXT_PACKAGE)^g' < $< > $@
gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
@GSETTINGS_RULES@

convertdir = $(datadir)/MateConf/gsettings
convert_DATA = mate-control-center.convert

ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}

CLEANFILES = \
$(gsettings_SCHEMAS_in) \
$(gsettings_SCHEMAS) \
*.gschema.valid

Expand All @@ -53,8 +51,7 @@ MAINTAINERCLEANFILES = \

EXTRA_DIST = \
autogen.sh \
org.mate.control-center.gschema.xml.in.in \
org.mate.control-center.keybinding.gschema.xml.in.in \
$(gsettingsschema_in_files) \
$(convert_DATA)

DISTCHECK_CONFIGURE_FLAGS = --disable-update-mimedb
Expand Down
4 changes: 3 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ changequote([,])dnl

# Internationalization support

IT_PROG_INTLTOOL([0.37.1])
IT_PROG_INTLTOOL([0.50.1])

GETTEXT_PACKAGE=mate-control-center
AC_SUBST(GETTEXT_PACKAGE)
Expand Down Expand Up @@ -327,6 +327,8 @@ fi

AC_CONFIG_FILES([
Makefile
org.mate.control-center.gschema.xml
org.mate.control-center.keybinding.gschema.xml
capplets/Makefile
capplets/about-me/Makefile
capplets/about-me/mate-about-me.desktop.in
Expand Down
47 changes: 47 additions & 0 deletions org.mate.control-center.gschema.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<schemalist gettext-domain="@GETTEXT_PACKAGE@">
<schema id="org.mate.control-center" path="/org/mate/control-center/">
<child name="appearance" schema="org.mate.control-center.appearance" />
<key name="cc-actions-list" type="as">
<default l10n="messages">[ 'Change Theme;mate-appearance-properties.desktop', 'Set Preferred Applications;mate-default-applications-properties.desktop' ]</default>
<summary>Task names and associated .desktop files</summary>
<description>The task name to be displayed in the control-center followed by a ";" separator then the filename of an associated .desktop file to launch for that task.</description>
</key>
<key name="cc-exit-shell-on-static-action" type="b">
<default>false</default>
<summary>Close the control-center when a task is activated</summary>
<description>if true, the control-center will close when a "Common Task" is activated.</description>
</key>
<key name="cc-exit-shell-on-action-start" type="b">
<default>false</default>
<summary>Exit shell on start action performed</summary>
<description>Indicates whether to close the shell when a start action is performed.</description>
</key>
<key name="cc-exit-shell-on-action-help" type="b">
<default>false</default>
<summary>Exit shell on help action performed</summary>
<description>Indicates whether to close the shell when a help action is performed.</description>
</key>
<key name="cc-exit-shell-on-action-add-remove" type="b">
<default>false</default>
<summary>Exit shell on add or remove action performed</summary>
<description>Indicates whether to close the shell when an add or remove action is performed.</description>
</key>
<key name="cc-exit-shell-on-action-upgrade-uninstall" type="b">
<default>false</default>
<summary>Exit shell on upgrade or uninstall action performed</summary>
<description>Indicates whether to close the shell when an upgrade or uninstall action is performed.</description>
</key>
</schema>
<schema id="org.mate.control-center.appearance" path="/org/mate/control-center/appearance/">
<key name="more-backgrounds-url" type="s">
<default>'http://mate-desktop.org/backgrounds/'</default>
<summary>More backgrounds URL</summary>
<description>URL for where to get more desktop backgrounds. If set to an empty string the link will not appear.</description>
</key>
<key name="more-themes-url" type="s">
<default>'http://mate-desktop.org/themes/'</default>
<summary>More themes URL</summary>
<description>URL for where to get more desktop themes. If set to an empty string the link will not appear.</description>
</key>
</schema>
</schemalist>
47 changes: 0 additions & 47 deletions org.mate.control-center.gschema.xml.in.in

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<schema id="org.mate.control-center.keybinding">
<key name="binding" type="s">
<default>''</default>
<_summary>Keybinding</_summary>
<_description>Keybinding associated with a custom shortcut.</_description>
<summary>Keybinding</summary>
<description>Keybinding associated with a custom shortcut.</description>
</key>
<key name="action" type="s">
<default>''</default>
<_summary>Command</_summary>
<_description>Command associated with a custom keybinding.</_description>
<summary>Command</summary>
<description>Command associated with a custom keybinding.</description>
</key>
<key name="name" type="s">
<default>''</default>
<_summary>Name</_summary>
<_description>Description associated with a custom keybinding.</_description>
<summary>Name</summary>
<description>Description associated with a custom keybinding.</description>
</key>
</schema>
</schemalist>
4 changes: 2 additions & 2 deletions po/POTFILES.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Add files with translateable strings here.
# Please keep this file sorted alphabetically.
[encoding: UTF-8]
org.mate.control-center.gschema.xml.in.in
org.mate.control-center.keybinding.gschema.xml.in.in
[type: gettext/gsettings]org.mate.control-center.gschema.xml.in
[type: gettext/gsettings]org.mate.control-center.keybinding.gschema.xml.in
capplets/about-me/eel-alert-dialog.c
capplets/about-me/e-image-chooser.c
capplets/about-me/mate-about-me.c
Expand Down

0 comments on commit bcf861f

Please sign in to comment.