From 4bee2863e8d2e51b185b6d149e6259848d8c0cb6 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sun, 20 May 2012 15:01:01 +0900 Subject: [PATCH] dconf: use text-based key file and dconf update BUG=none TEST=manually Review URL: https://codereview.appspot.com/6215062 --- data/dconf/Makefile.am | 18 +++++++++------ data/dconf/make-dconf-override-db.sh | 33 ++++++++++++++++++++-------- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/data/dconf/Makefile.am b/data/dconf/Makefile.am index daea8968..54861a7e 100644 --- a/data/dconf/Makefile.am +++ b/data/dconf/Makefile.am @@ -32,6 +32,7 @@ EXTRA_DIST = \ $(gsettings_schemas_in_files) \ make-dconf-override-db.sh \ profile/ibus \ + 00-upstream-settings \ $(NULL) DISTCLEANFILES = \ @@ -40,23 +41,26 @@ DISTCLEANFILES = \ MAINTAINERCLEANFILES = \ $(gsettings_schemas_in_files) \ + 00-upstream-settings \ $(NULL) -CLEANFILES = \ - db/ibus \ - $(NULL) +dconfprofiledir = $(sysconfdir)/dconf/profile +dconfprofile_DATA = profile/ibus -dconfprofiledir = $(sysconfdir)/dconf -nobase_dconfprofile_DATA = db/ibus profile/ibus +dconfdbdir = $(sysconfdir)/dconf/db/ibus.d +dconfdb_DATA = 00-upstream-settings org.freedesktop.ibus.gschema.xml.in: $(top_srcdir)/data/ibus.schemas.in $(AM_V_GEN) gsettings-schema-convert --force --gconf --xml \ --schema-id "org.freedesktop.ibus" \ --output $@ $< -db/ibus: $(srcdir)/make-dconf-override-db.sh $(gsettings_SCHEMAS) +00-upstream-settings: $(srcdir)/make-dconf-override-db.sh $(gsettings_SCHEMAS) @$(MKDIR_P) db - $(AM_V_GEN) $(srcdir)/make-dconf-override-db.sh $@ || \ + $(AM_V_GEN) $(srcdir)/make-dconf-override-db.sh > $@ || \ { rc=$$?; $(RM) -rf $@; exit $$rc; } +install-data-hook: + dconf update + -include $(top_srcdir)/git.mk diff --git a/data/dconf/make-dconf-override-db.sh b/data/dconf/make-dconf-override-db.sh index 0d8456b0..49a6df97 100755 --- a/data/dconf/make-dconf-override-db.sh +++ b/data/dconf/make-dconf-override-db.sh @@ -15,17 +15,32 @@ trap 'rm -rf $TMPDIR; kill $DBUS_SESSION_BUS_PID' ERR # in case that schema is not installed on the system glib-compile-schemas --targetdir "$GSETTINGS_SCHEMA_DIR" "$PWD" -gsettings list-recursively org.freedesktop.ibus.general | \ -while read schema key val; do - gsettings set "$schema" "$key" "$val" +cat <