[gnome-screenshot] Simplify gschema translations



commit 875a20aeced0cdeb08c9e49245e6d0e36ba4a87d
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Fri Jun 17 16:54:13 2016 -0500

    Simplify gschema translations
    
    Use intltool's gsettings support instead of the generic XML support.
    
    It's working fine for me in jhbuild, but in Endless we're getting
    translations merged into the gschema file, which isn't right. Modernize
    this code, so I don't have to figure out what's wrong.

 .gitignore                                    |    1 -
 configure.ac                                  |    2 +-
 po/POTFILES.in                                |    2 +-
 src/Makefile.am                               |   10 +----
 src/org.gnome.gnome-screenshot.gschema.xml    |   55 +++++++++++++++++++++++++
 src/org.gnome.gnome-screenshot.gschema.xml.in |   55 -------------------------
 6 files changed, 59 insertions(+), 66 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b176e2e..21d639b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,5 +35,4 @@ src/screenshot-resources.*
 Makefile
 Makefile.in*
 
-*.gschema.xml
 *.gschema.valid
diff --git a/configure.ac b/configure.ac
index 59e375f..c349e9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ AM_SILENT_RULES([yes])
 GETTEXT_PACKAGE=AC_PACKAGE_NAME
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
-IT_PROG_INTLTOOL(0.40.0)
+IT_PROG_INTLTOOL(0.50.2)
 
 AC_PROG_CC
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 12a41cd..54698f5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -5,7 +5,7 @@ src/org.gnome.Screenshot.desktop.in
 src/org.gnome.Screenshot.appdata.xml.in
 [type: gettext/glade]src/screenshot-app-menu.ui
 [type: gettext/glade]src/screenshot-dialog.ui
-src/org.gnome.gnome-screenshot.gschema.xml.in
+src/org.gnome.gnome-screenshot.gschema.xml
 src/screenshot-application.c
 src/screenshot-config.c
 src/screenshot-dialog.c
diff --git a/src/Makefile.am b/src/Makefile.am
index f3b7fff..3a14900 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -66,9 +66,6 @@ appdata_DATA = $(appdata_in_files:.xml.in=.xml)
 appdata_in_files = org.gnome.Screenshot.appdata.xml.in
 @INTLTOOL_XML_RULE@
 
-%.gschema.xml: %.gschema.xml.in
-       $(AM_V_GEN) $(INTLTOOL_MERGE) -x -u --no-translations $< $@
-
 dbusservicedir = $(datadir)/dbus-1/services
 dbusservice_DATA = org.gnome.Screenshot.service
 
@@ -80,9 +77,7 @@ org.gnome.Screenshot.service: Makefile
 
 man_MANS = gnome-screenshot.1
 
-gsettingsschema_in_files = org.gnome.gnome-screenshot.gschema.xml.in
-gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
-.PRECIOUS: $(gsettings_SCHEMAS)
+gsettings_SCHEMAS = org.gnome.gnome-screenshot.gschema.xml
 
 convertdir = $(datadir)/GConf/gsettings
 convert_DATA = gnome-screenshot.convert
@@ -91,7 +86,7 @@ convert_DATA = gnome-screenshot.convert
 
 EXTRA_DIST =                                   \
        $(appdata_in_files)                     \
-       $(gsettingsschema_in_files)             \
+       $(gsettings_SCHEMAS)                    \
        $(gnome_screenshot_in_files)            \
        $(man_MANS)                             \
        $(convert_DATA)                         \
@@ -102,7 +97,6 @@ EXTRA_DIST =                                 \
 CLEANFILES = \
        $(BUILT_SOURCES)                        \
        $(appdata_DATA)                         \
-       $(gsettings_SCHEMAS)                    \
        $(gnome_screenshot_DATA)                \
        $(dbusservice_DATA)                     \
        $(NULL)
diff --git a/src/org.gnome.gnome-screenshot.gschema.xml b/src/org.gnome.gnome-screenshot.gschema.xml
new file mode 100644
index 0000000..17cdf0b
--- /dev/null
+++ b/src/org.gnome.gnome-screenshot.gschema.xml
@@ -0,0 +1,55 @@
+<schemalist gettext-domain="gnome-screenshot">
+ <enum id="org.gnome.gnome-screenshot.file-types">
+    <value nick="bmp" value="0"/>
+    <value nick="jpg" value="1"/>
+    <value nick="png" value="2"/>
+    <value nick="tiff" value="3"/>
+  </enum>
+  <schema id="org.gnome.gnome-screenshot" path="/org/gnome/gnome-screenshot/" 
gettext-domain="gnome-screenshot">
+    <key name="take-window-shot" type="b">
+      <default>false</default>
+      <summary>Window-specific screenshot (deprecated)</summary>
+      <description>Grab just the current window, rather than the whole desktop. This key has been deprecated 
and it is no longer in use.</description>
+    </key>
+    <key name="delay" type="i">
+      <default>0</default>
+      <summary>Screenshot delay</summary>
+      <description>The number of seconds to wait before taking the screenshot.</description>
+    </key>
+    <key name="auto-save-directory" type="s">
+      <default>''</default>
+      <summary>Screenshot directory</summary>
+      <description>The directory where the screenshots will be saved by default.</description>
+    </key>
+    <key name="last-save-directory" type="s">
+      <default>''</default>
+      <summary>Last save directory</summary>
+      <description>The last directory a screenshot was saved in interactive mode.</description>
+    </key>
+    <key name="include-border" type="b">
+      <default>true</default>
+      <summary>Include Border</summary>
+      <description>Include the window manager border along with the screenshot</description>
+    </key>
+    <key name="include-pointer" type="b">
+      <default>false</default>
+      <summary>Include Pointer</summary>
+      <description>Include the pointer in the screenshot</description>
+    </key>
+    <key name="include-icc-profile" type="b">
+      <default>true</default>
+      <summary>Include ICC Profile</summary>
+      <description>Include the ICC profile of the target in the screenshot file</description>
+    </key>
+    <key name="border-effect" type="s">
+      <default>'none'</default>
+      <summary>Border Effect</summary>
+      <description>Effect to add to the outside of a border.  Possible values are "shadow", "none", and 
"border".</description>
+    </key>
+    <key name="default-file-type" enum="org.gnome.gnome-screenshot.file-types">
+      <default>'png'</default>
+      <summary>Default file type extension</summary>
+      <description>The default file type extension for screenshots.</description>
+    </key>
+  </schema>
+</schemalist>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]