[sound-juicer/wip/gsettings: 3/3] Add a schema file



commit b3137bad7531c7ef1de9b54019db70adbe82b762
Author: Gert Michael Kulyk <gkulyk klio>
Date:   Sun Sep 2 13:05:50 2012 +0200

    Add a schema file
    
    Part of the fixes for bgo #625897.

 configure.ac                           |    2 +-
 data/Makefile.am                       |   14 ++++
 data/org.gnome.SoundJuicer.gschema.xml |  110 ++++++++++++++++++++++++++++++++
 data/sound-juicer.convert              |   10 +++
 git.mk                                 |    5 ++
 po/POTFILES.in                         |    1 +
 6 files changed, 141 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c49b83c..a810398 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ AM_PROG_CC_C_O
 AC_HEADER_STDC
 AC_PROG_LIBTOOL
 AC_PROG_INSTALL
-IT_PROG_INTLTOOL([0.40.0], [no-xml])
+IT_PROG_INTLTOOL([0.50.0])
 
 GNOME_COMPILE_WARNINGS([maximum])
 GNOME_DEBUG_CHECK
diff --git a/data/Makefile.am b/data/Makefile.am
index 8ca00d0..18e03d1 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -6,6 +6,13 @@ desktop_in_files = sound-juicer.desktop.in.in
 desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
+gsettings_SCHEMAS = org.gnome.SoundJuicer.gschema.xml
+
+ GSETTINGS_RULES@
+
+convertdir = $(datadir)/GConf/gsettings
+convert_DATA = sound-juicer.convert
+
 profilesdir = $(datadir)/sound-juicer
 dist_profiles_DATA = rhythmbox.gep
 
@@ -64,8 +71,15 @@ uninstall-hook: update-icon-cache
 CLEANFILES = \
        $(desktop_DATA)
 
+DISTCLEANFILES = \
+       $(desktop_DATA)
+
 EXTRA_DIST = \
+       $(gsettings_SCHEMAS) \
+       sound-juicer.convert \
        $(man1_MANS) \
        $(icons)
 
+MAINTAINERCLEANFILES = $(gsettings_SCHEMAS:.xml=.valid)
+
 -include $(top_srcdir)/git.mk
diff --git a/data/org.gnome.SoundJuicer.gschema.xml b/data/org.gnome.SoundJuicer.gschema.xml
new file mode 100644
index 0000000..444f5cc
--- /dev/null
+++ b/data/org.gnome.SoundJuicer.gschema.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0"?>
+<schemalist>
+
+  <enum id="org.gnome.SoundJuicer.paranoia">
+    <value nick="disable" value="0"/>
+    <value nick="fragment" value="2"/>
+    <value nick="overlap" value="4"/>
+    <value nick="scratch" value="8"/>
+    <value nick="repair" value="16"/>
+    <value nick="full" value="255"/>
+  </enum>
+
+  <schema gettext-domain="sound-juicer" id="org.gnome.SoundJuicer" path="/org/gnome/SoundJuicer/">
+
+    <!-- Please note: There is no default value for the 'device' key
+                      because SoundJuicer does not handle symlinks like
+                      e.g. /dev/cdrom -->
+    <key name="device" type="s">
+      <default>''</default>
+      <summary>The CD to extract from.</summary>
+      <description>Please note: SoundJuicer currently only handles real device names, no symlinks like e.g. 
/dev/cdrom. An empty key implicates that the system's default cdrom drive will be used.</description>
+    </key>
+
+    <key name="eject" type="b">
+      <default>false</default>
+      <summary>Whether to eject the CD when finished extracting.</summary>
+    </key>
+
+    <key name="open-completed" type="b">
+      <default>false</default>
+      <summary>Whether to open the target directory when finished extracting.</summary>
+    </key>
+
+    <key name="base-uri" type="s">
+      <default>''</default>
+      <summary>The URI to save the extracted music to.</summary>
+    </key>
+
+    <key name="path-pattern" type="s">
+      <default>'%aa/%at'</default>
+      <summary>The directory structure for the files</summary>
+      <description>%at -- album title %aT -- album title (lowercase) %aa -- album artist %aA -- album artist 
(lowercase) %as -- album artist (sortable) %aS -- album artist (sortable lowercase) %ay -- album year %tt -- 
track title %tT -- track title (lowercase) %ta -- track artist %tA -- track artist (lowercase) %ts -- track 
artist (sortable) %tS -- track artist (sortable lowercase)</description>
+    </key>
+
+    <key name="file-pattern" type="s">
+      <default>'%dn - %tt'</default>
+      <summary>The name pattern for files</summary>
+      <description>Do not specify an extension. %at -- album title %aT -- album title (lowercase) %aa -- 
album artist %aA -- album artist (lowercase) %as -- album artist (sortable) %aS -- album artist (sortable 
lowercase) %tn -- track number (i.e 8) %tN -- track number, zero padded (i.e 08) %tt -- track title %tT -- 
track title (lowercase) %ta -- track artist %tA -- track artist (lowercase) %ts -- track artist (sortable) 
%tS -- track artist (sortable lowercase) %dn -- disc and track number (i.e Disk 2 - 6, or 6) %dN -- disc 
number, zero padded (i.e d02t06, or 06)</description>
+    </key>
+
+    <key name="paranoia" enum="org.gnome.SoundJuicer.paranoia">
+      <default>'scratch'</default>
+      <summary>The paranoia mode to use</summary>
+      <description>Paranoia mode: 0) disable 2) fragment 4) overlap 8) scratch 16) repair 255) 
full</description>
+    </key>
+
+    <key name="strip-special" type="b">
+      <default>false</default>
+      <summary>If to strip special characters from filenames</summary>
+      <description>If enabled, special characters such as space, wildcards and backslashes will be removed 
from the output filename.</description>
+    </key>
+
+    <key name="audio-profile" type="s">
+      <default>'audio/x-vorbis'</default>
+      <summary>Media type to encode to</summary>
+      <description>The GStreamer media type to encode to.</description>
+    </key>
+
+    <!-- Please note: The 'volume' key may be deprecated soon -->
+    <key name="volume" type="d">
+      <default>1.0</default>
+      <summary>Audio volume</summary>
+    </key>
+
+    <key name="maximized" type="b">
+      <default>false</default>
+      <summary>Whether the window is maximized</summary>
+      <description>
+        True if the window is maximized. Otherwise, the size and position are determined
+        by the size and position keys.
+      </description>
+    </key>
+
+    <key name="width" type="i">
+      <default>790</default>
+      <summary>The width of the main window</summary>
+      <description>The width of the main window.</description>
+    </key>
+
+    <key name="height" type="i">
+      <default>560</default>
+      <summary>The height of the main window</summary>
+      <description>The height of the main window.</description>
+    </key>
+
+    <key name="position-x" type="i">
+      <default>-1</default>
+      <summary>Main window horizontal position</summary>
+      <description>The horizontal position of the window, if not maximized.</description>
+    </key>
+
+    <key name="position-y" type="i">
+      <default>-1</default>
+      <summary>Main window vertical position</summary>
+      <description>The vertical position of the window, if not maximized.</description>
+    </key>
+
+  </schema>
+
+</schemalist>
diff --git a/data/sound-juicer.convert b/data/sound-juicer.convert
new file mode 100644
index 0000000..e922f80
--- /dev/null
+++ b/data/sound-juicer.convert
@@ -0,0 +1,10 @@
+[org.gnome.SoundJuicer]
+audio-profile = /apps/sound-juicer/audio_profile
+base-uri = /apps/sound-juicer/base_uri
+eject = /apps/sound-juicer/eject
+file-pattern = /apps/sound-juicer/file_pattern
+maximized = /apps/sound-juicer/window_maximized
+open-completed = /apps/sound-juicer/open_completed
+path-pattern = /apps/sound-juicer/path_pattern
+strip-special = /apps/sound-juicer/strip-special
+volume = /apps/sound-juicer/volume
diff --git a/git.mk b/git.mk
index 5ab41ba..d086a3a 100644
--- a/git.mk
+++ b/git.mk
@@ -105,6 +105,11 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
                                "*/*.omf.out" \
                        ; do echo /$$x; done; \
                fi; \
+               if test "x$(gsettings_SCHEMAS)" = x; then :; else \
+                       for x in \
+                               $(gsettings_SCHEMAS:.xml=.valid) \
+                       ; do echo /$$x; done; \
+               fi; \
                if test -f $(srcdir)/po/Makefile.in.in; then \
                        for x in \
                                po/Makefile.in.in \
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 03926a3..22262b5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,7 @@
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
 [encoding: UTF-8]
+data/org.gnome.SoundJuicer.gschema.xml
 data/sound-juicer.desktop.in.in
 [type: gettext/glade]data/sound-juicer.ui
 [type: gettext/glade]data/sound-juicer-menu.ui


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