[Xfce4-commits] <terminal:master> Use xmllint to strip the glade file.

Nick Schermer noreply at xfce.org
Tue Dec 25 15:02:02 CET 2012


Updating branch refs/heads/master
         to c93b45e6a3bf3ad4797008ac2a546833a78321f3 (commit)
       from d978e5dcc3a111b88949f20ce8760a14981a1138 (commit)

commit c93b45e6a3bf3ad4797008ac2a546833a78321f3
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Dec 25 14:59:06 2012 +0100

    Use xmllint to strip the glade file.

 configure.ac.in                        |    9 +++++++--
 po/POTFILES.skip                       |    1 +
 terminal/Makefile.am                   |    9 +++++++--
 terminal/terminal-preferences-dialog.c |    2 +-
 4 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 8e53db1..8b18c25 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -86,6 +86,11 @@ XDT_CHECK_PACKAGE([VTE], [vte], [0.28])
 XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.26.0])
 XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.10.0])
 
+dnl ***********************************
+dnl *** Used to compress glade data ***
+dnl ***********************************
+AC_PATH_PROG([XMLLINT], [xmllint], [no])
+
 dnl ***************************************************
 dnl *** Check if we need to build the documentation ***
 dnl ***************************************************
@@ -102,8 +107,8 @@ if test x"$enable_gen_doc" = x"yes"; then
         enable_gen_doc=no
     fi
 
-    AC_PATH_PROG([XMLLINT], [xmllint], [no])
-    if test x"$XML2PO" = x"no"; then
+    dnl we checked for xmllint above
+    if test x"$XMLLINT" = x"no"; then
         enable_gen_doc=no
     fi
 
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
new file mode 100644
index 0000000..d475e86
--- /dev/null
+++ b/po/POTFILES.skip
@@ -0,0 +1 @@
+terminal/terminal-preferences.ui
diff --git a/terminal/Makefile.am b/terminal/Makefile.am
index 1077e7f..eeb1817 100644
--- a/terminal/Makefile.am
+++ b/terminal/Makefile.am
@@ -68,7 +68,7 @@ xfce4_terminal_LDADD = \
 	$(TERMINAL_LIBS)
 
 uidir = $(datadir)/xfce4/terminal
-ui_DATA = terminal-preferences.glade
+ui_DATA = terminal-preferences.ui
 
 ##
 ## Rules to auto-generate built sources
@@ -90,6 +90,7 @@ DISTCLEANFILES = \
 	stamp-terminal-enum-types.h \
 	stamp-terminal-marshal.h \
 	terminal-window-ui.h \
+	terminal-preferences.ui \
 	$(Terminal_built_sources)
 
 BUILT_SOURCES = \
@@ -99,6 +100,9 @@ BUILT_SOURCES = \
 terminal-window-ui.h: Makefile $(srcdir)/terminal-window-ui.xml
 	$(AM_V_GEN) xdt-csource --strip-comments --strip-content --static --name=terminal_window_ui $(srcdir)/terminal-window-ui.xml > terminal-window-ui.h
 
+terminal-preferences.ui: $(srcdir)/terminal-preferences.glade Makefile
+	$(AM_V_GEN) $(XMLLINT) --nonet --noblanks $< > $@ || cat $< > $@
+
 terminal-enum-types.h: stamp-terminal-enum-types.h
 	@true
 stamp-terminal-enum-types.h: terminal-preferences.h Makefile
@@ -150,6 +154,7 @@ EXTRA_DIST =\
 	$(ui_DATA) \
 	terminal-config.h.in \
 	terminal-marshal.list \
-	terminal-window-ui.xml
+	terminal-window-ui.xml \
+	terminal-preferences.glade
 
 # vi:set ts=8 sw=8 noet ai nocindent:
diff --git a/terminal/terminal-preferences-dialog.c b/terminal/terminal-preferences-dialog.c
index c1663ac..f05ee81 100644
--- a/terminal/terminal-preferences-dialog.c
+++ b/terminal/terminal-preferences-dialog.c
@@ -146,7 +146,7 @@ terminal_preferences_dialog_init (TerminalPreferencesDialog *dialog)
 
   /* lookup the ui file */
   xfce_resource_push_path (XFCE_RESOURCE_DATA, DATADIR);
-  file = xfce_resource_lookup (XFCE_RESOURCE_DATA, "xfce4/terminal/terminal-preferences.glade");
+  file = xfce_resource_lookup (XFCE_RESOURCE_DATA, "xfce4/terminal/terminal-preferences.ui");
   xfce_resource_pop_path (XFCE_RESOURCE_DATA);
 
   if (G_UNLIKELY (file == NULL))


More information about the Xfce4-commits mailing list