[byzanz] applet: Port from GConf to GSettings
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [byzanz] applet: Port from GConf to GSettings
- Date: Tue, 19 Mar 2013 17:01:11 +0000 (UTC)
commit a428601b89e510964a3fbf2e864d8472e2bdbd61
Author: Benjamin Otte <otte redhat com>
Date: Mon Mar 18 18:35:48 2013 +0100
applet: Port from GConf to GSettings
configure.ac | 5 +--
src/Makefile.am | 40 ++++++++++++------------
src/byzanz.schemas.in | 38 -----------------------
src/byzanzapplet.c | 2 -
src/org.gnome.byzanz.applet.gschema.xml.in.in | 23 ++++++++++++++
5 files changed, 45 insertions(+), 63 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 65e4f9a..abee254 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,6 +63,8 @@ AC_DEFINE_DIR(DATADIR, "${datadir}", [datadir])
dnl Check for essential libraries first:
dnl ====================================
+GLIB_GSETTINGS
+
CAIRO_REQ="1.10"
GTK_REQ="3.0.0"
APPLET_REQ="2.91.91"
@@ -82,9 +84,6 @@ AC_SUBST(appletdir)
PKG_CHECK_MODULES(GST, gstreamer-app-0.10 >= $GST_REQ gstreamer-0.10 >= $GST_REQ)
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
-AC_PATH_PROG(GCONFTOOL, gconftool-2)
-
-AM_GCONF_SOURCE_2
GIFENC_CFLAGS="$GTK_CFLAGS $ERROR_CFLAGS"
GIFENC_LIBS="$GTK_LIBS"
diff --git a/src/Makefile.am b/src/Makefile.am
index d57fae2..0b25857 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -82,16 +82,17 @@ byzanzmarshal.c: byzanzmarshal.list
$(GLIB_GENMARSHAL) --prefix=byzanz_marshal $(srcdir)/byzanzmarshal.list --body) > byzanzmarshal.c
-schemasdir = @GCONF_SCHEMA_FILE_DIR@
-schemas_in_files = byzanz.schemas.in
-schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
+gsettings_schemas_in_in = org.gnome.byzanz.applet.gschema.xml.in.in
- INTLTOOL_SCHEMAS_RULE@
+ INTLTOOL_XML_NOMERGE_RULE@
-if GCONF_SCHEMAS_INSTALL
-install-data-local:
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule
$(schemas_DATA) ;
-endif
+gsettings_schemas_in = $(gsettings_schemas_in_in:.xml.in.in=.xml.in)
+gsettings_SCHEMAS = $(gsettings_schemas_in:.xml.in=.xml)
+
+%.gschema.xml.in: %.gschema.xml.in.in Makefile
+ $(AM_V_GEN) $(SED) -e 's^\ datadir\@^$(datadir)^g' -e 's^\ GETTEXT_PACKAGE\@^$(GETTEXT_PACKAGE)^g' <
$< > $@
+
+ GSETTINGS_RULES@
applet_in_files = org.gnome.ByzanzApplet.panel-applet.in
applet_DATA = $(applet_in_files:.panel-applet.in=.panel-applet)
@@ -104,25 +105,24 @@ $(applet_in_files): $(applet_in_files).in Makefile
%.panel-applet: %.panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE)
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-servicedir = $(datadir)/dbus-1/services
-service_in_files = org.gnome.panel.applet.ByzanzAppletFactory.service.in
-service_DATA = $(service_in_files:.service.in=.service)
-
-org.gnome.panel.applet.ByzanzAppletFactory.service: $(service_in_files)
- sed \
- -e "s|\ LIBEXECDIR\@|$(libexecdir)|" \
- $< > $@
-
uidir = $(datadir)/byzanz
ui_DATA = byzanzapplet.xml
-CLEANFILES = $(applet_DATA) $(applet_DATA).in $(service_DATA) $(schemas_DATA) $(BUILT_SOURCES)
+CLEANFILES = \
+ $(applet_DATA) \
+ $(applet_DATA).in \
+ $(service_DATA) \
+ $(schemas_DATA) \
+ $(BUILT_SOURCES) \
+ $(gsettings_SCHEMAS_in) \
+ $(gsettings_SCHEMAS) \
+ *.gschema.valid
EXTRA_DIST = \
byzanzmarshal.list \
org.gnome.ByzanzApplet.panel-applet.in.in \
+ $(gsettings_schemas_in_in) \
$(man_MANS) \
- $(ui_DATA) \
- $(schemas_in_files)
+ $(ui_DATA)
diff --git a/src/byzanzapplet.c b/src/byzanzapplet.c
index 9efe320..13cab46 100644
--- a/src/byzanzapplet.c
+++ b/src/byzanzapplet.c
@@ -55,8 +55,6 @@ typedef struct {
/*** PENDING RECORDING ***/
static void
-byzanz_applet_show_error (AppletPrivate *priv, const char *error, const char *details, ...) G_GNUC_PRINTF
(3, 4);
-static void
byzanz_applet_show_error (AppletPrivate *priv, const char *error, const char *details, ...)
{
GtkWidget *dialog, *parent;
diff --git a/src/org.gnome.byzanz.applet.gschema.xml.in.in b/src/org.gnome.byzanz.applet.gschema.xml.in.in
new file mode 100644
index 0000000..9f2ec08
--- /dev/null
+++ b/src/org.gnome.byzanz.applet.gschema.xml.in.in
@@ -0,0 +1,23 @@
+<schemalist gettext-domain="@GETTEXT_PACKAGE@">
+ <schema id="org.gnome.byzanz.applet">
+
+ <key name="save-filename" type="s">
+ <default>''</default>
+ <_summary>Save filename</_summary>
+ <_description>URI for the filename Byzanz will suggest when starting a recording.</_description>
+ </key>
+
+ <key name="method" type="s">
+ <default>'screen'</default>
+ <_summary>Recording method</_summary>
+ <_description>Use this method as the default method for recording. Must be one of "screen" for
recording the whole screen, "area" for selecting an area or "window" to select a window.</_description>
+ </key>
+
+ <key name="record-audio" type="b">
+ <default>true</default>
+ <_summary>Record audio</_summary>
+ <_description>If set, Byzanz will record audio from the default audio device if the format supports
it. This allows narrating along with the recording.</_description>
+ </key>
+
+ </schema>
+</schemalist>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]