[krb5-auth-dialog] merge schema translations



commit f47765829bc612f9be8071f3d5629b73d5430d27
Author: Christian Persch <chpe gnome org>
Date:   Mon May 11 23:51:57 2009 +0200

    merge schema translations
    
    and use gconftool to install the schema.
---
 ChangeLog                       |   12 +++++++++
 configure.ac                    |    7 +++++
 po/POTFILES.in                  |    1 +
 preferences/Makefile.am         |    2 -
 src/Makefile.am                 |   17 +++++++++----
 src/krb5-auth-dialog.schemas.in |   48 +++++++++++++++++++-------------------
 6 files changed, 56 insertions(+), 31 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index eb5b85d..73fd21e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Tue May 12 00:31:56 CEST 2009 Guido Günther <agx sigxcpu org>
+
+	merge schema translations and use gconftool to install the schema
+	* configure.ac: Check for gcontool and add AM_GCONF_SOURCE_2.
+	* po/POTFILES.in: Add src/krb5-auth-dialog.schemas.in.
+	* preferences/Makefile.am: Remove schemadir.
+	* src/Makefile.am: Add INTLTOOL_SCHEMAS_RULE and add
+	  install-data-local target to install via gconftool.
+	* src/krb5-auth-dialog.schemas.in: Don't use ::PACKAGE:: since .in is
+	  transformed by intltool now.
+	BZ: #581906 - patch by Christian Persch
+
 Mon May 11 00:46:24 CEST 2009 Guido Günther <agx sigxcpu org>
 
 	cleanup CFLAGS handling, terminate all lists with $(NULL)
diff --git a/configure.ac b/configure.ac
index e8b88fb..3156056 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,13 @@ PKG_CHECK_MODULES(GCONF, gconf-2.0 >= $GCONF_REQUIRED)
 PKG_CHECK_MODULES(GIO_UNIX, gio-unix-2.0 >= $GIO_UNIX_REQUIRED)
 PKG_CHECK_MODULES(GIO, gio-2.0 >= $GIO_REQUIRED)
 
+AM_GCONF_SOURCE_2
+
+AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no])
+if test "$GCONFTOOL" = "no"; then
+  AC_MSG_ERROR([gconftool-2 not found])
+fi
+
 dnl --enable-debug=(yes|no)
 AC_ARG_ENABLE(debug,
               AC_HELP_STRING([--enable-debug=no/yes],
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 133ceed..94e024d 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,3 +1,4 @@
+src/krb5-auth-dialog.schemas.in
 src/krb5-auth-dialog.xml
 src/krb5-auth-dialog.c
 src/krb5-auth-pwdialog.c
diff --git a/preferences/Makefile.am b/preferences/Makefile.am
index a0d8a03..56d93cb 100644
--- a/preferences/Makefile.am
+++ b/preferences/Makefile.am
@@ -2,8 +2,6 @@ NULL =
 
 bin_PROGRAMS = krb5-auth-dialog-preferences
 
-schemadir = $(sysconfdir)/gconf/schemas
-
 krb5_auth_dialog_preferences_SOURCES = \
 	krb5-auth-dialog-preferences.c \
 	$(top_srcdir)/src/krb5-auth-gconf-tools.c \
diff --git a/src/Makefile.am b/src/Makefile.am
index f6903e1..92ab201 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,12 +8,10 @@ autostart_in_files = krb5-auth-dialog.desktop.in
 autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
-schemadir = $(sysconfdir)/gconf/schemas
-schema_in_files = $(PACKAGE).schemas.in
+schemadir = $(GCONF_SCHEMA_FILE_DIR)
+schema_in_files = krb5-auth-dialog.schemas.in
 schema_DATA = $(schema_in_files:.schemas.in=.schemas)
-
-%.schemas: $(srcdir)/%.schemas.in
-	sed -e "s,::PACKAGE::,$(PACKAGE)," < $< > $@
+ INTLTOOL_SCHEMAS_RULE@
 
 servicedir       = $(datadir)/dbus-1/services
 service_in_files = org.gnome.KrbAuthDialog.service.in
@@ -106,3 +104,12 @@ DISTCLEANFILES = \
 	krb5-auth-applet-dbus-glue.h \
 	$(NULL)
 
+install-data-local: $(schema_DATA)
+if GCONF_SCHEMAS_INSTALL
+	if test -z "$(DESTDIR)" ; then \
+	for p in $^ ; do \
+		GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p 2>&1 > /dev/null; \
+	done \
+	fi
+endif
+
diff --git a/src/krb5-auth-dialog.schemas.in b/src/krb5-auth-dialog.schemas.in
index 4b7adb8..bc3143e 100644
--- a/src/krb5-auth-dialog.schemas.in
+++ b/src/krb5-auth-dialog.schemas.in
@@ -1,9 +1,9 @@
 <gconfschemafile>
   <schemalist>
     <schema>
-      <key>/schemas/apps/::PACKAGE::/show_trayicon</key>
-      <applyto>/apps/::PACKAGE::/show_trayicon</applyto>
-      <owner>::PACKAGE::</owner>
+      <key>/schemas/apps/krb5-auth-dialog/show_trayicon</key>
+      <applyto>/apps/krb5-auth-dialog/show_trayicon</applyto>
+      <owner>krb5-auth-dialog</owner>
       <type>bool</type>
       <default>1</default>
 
@@ -14,9 +14,9 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/::PACKAGE::/principal</key>
-      <applyto>/apps/::PACKAGE::/principal</applyto>
-      <owner>::PACKAGE::</owner>
+      <key>/schemas/apps/krb5-auth-dialog/principal</key>
+      <applyto>/apps/krb5-auth-dialog/principal</applyto>
+      <owner>krb5-auth-dialog</owner>
       <type>string</type>
       <default></default>
 
@@ -27,9 +27,9 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/::PACKAGE::/pk_userid</key>
-      <applyto>/apps/::PACKAGE::/pk_userid</applyto>
-      <owner>::PACKAGE::</owner>
+      <key>/schemas/apps/krb5-auth-dialog/pk_userid</key>
+      <applyto>/apps/krb5-auth-dialog/pk_userid</applyto>
+      <owner>krb5-auth-dialog</owner>
       <type>string</type>
       <default></default>
 
@@ -40,9 +40,9 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/::PACKAGE::/pk_anchors</key>
-      <applyto>/apps/::PACKAGE::/pk_anchors</applyto>
-      <owner>::PACKAGE::</owner>
+      <key>/schemas/apps/krb5-auth-dialog/pk_anchors</key>
+      <applyto>/apps/krb5-auth-dialog/pk_anchors</applyto>
+      <owner>krb5-auth-dialog</owner>
       <type>string</type>
       <default></default>
 
@@ -53,9 +53,9 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/::PACKAGE::/prompt_minutes</key>
-      <applyto>/apps/::PACKAGE::/prompt_minutes</applyto>
-      <owner>::PACKAGE::</owner>
+      <key>/schemas/apps/krb5-auth-dialog/prompt_minutes</key>
+      <applyto>/apps/krb5-auth-dialog/prompt_minutes</applyto>
+      <owner>krb5-auth-dialog</owner>
       <type>int</type>
       <default>30</default>
 
@@ -66,9 +66,9 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/::PACKAGE::/forwardable</key>
-      <applyto>/apps/::PACKAGE::/forwardable</applyto>
-      <owner>::PACKAGE::</owner>
+      <key>/schemas/apps/krb5-auth-dialog/forwardable</key>
+      <applyto>/apps/krb5-auth-dialog/forwardable</applyto>
+      <owner>krb5-auth-dialog</owner>
       <type>bool</type>
       <default>0</default>
 
@@ -79,9 +79,9 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/::PACKAGE::/renewable</key>
-      <applyto>/apps/::PACKAGE::/renewable</applyto>
-      <owner>::PACKAGE::</owner>
+      <key>/schemas/apps/krb5-auth-dialog/renewable</key>
+      <applyto>/apps/krb5-auth-dialog/renewable</applyto>
+      <owner>krb5-auth-dialog</owner>
       <type>bool</type>
       <default>0</default>
 
@@ -92,9 +92,9 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/::PACKAGE::/proxiable</key>
-      <applyto>/apps/::PACKAGE::/proxiable</applyto>
-      <owner>::PACKAGE::</owner>
+      <key>/schemas/apps/krb5-auth-dialog/proxiable</key>
+      <applyto>/apps/krb5-auth-dialog/proxiable</applyto>
+      <owner>krb5-auth-dialog</owner>
       <type>bool</type>
       <default>0</default>
 



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