[Xfce4-commits] <terminal:master> Merge branch 'nick/man'

Nick Schermer noreply at xfce.org
Mon Dec 14 16:24:12 CET 2009


Updating branch refs/heads/master
         to 1a806ef97e4d0a75c7df1adbbe6458b253bd36ea (commit)
       from 5d8ad9d280896bac4747526a00ee0816d706b678 (commit)

commit 1a806ef97e4d0a75c7df1adbbe6458b253bd36ea
Merge: 5d8ad9d280896bac4747526a00ee0816d706b678 76df72d2d1b7cb0c495288abe623082a54989abf
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Dec 14 15:57:42 2009 +0100

    Merge branch 'nick/man'

commit 76df72d2d1b7cb0c495288abe623082a54989abf
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Dec 14 13:54:11 2009 +0100

    Add comments for the translatable parameters.

commit 59725fc950b9a93379e1794e7e34c93a35b580e8
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Dec 14 13:43:26 2009 +0100

    Print options summary instead of opening the man page.
    
    This is more convenient most of the time, since most of the
    options speak for themselve. Referrer to the man page
    for full explanation of the commands.

commit 8557361acc99511f09cbbb389ff9694aed8521eb
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Dec 10 19:14:15 2009 +0100

    Some warnings in the XML.

commit 8963d862fb9cfeb08348f3622ad7d502cccae00e
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Dec 10 19:04:08 2009 +0100

    Create xref for geometry in manual.

commit b2d2575e974fc8d4eda52eb86a91c5d9150bb463
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Dec 10 18:09:43 2009 +0100

    Restore Benny's affiliation info.
    
    Took me some time to figure out the order of those, without
    warning from xmllint.

commit 6fd9bf5759b9229e74846a11040ad90f4daf623a
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Dec 10 16:26:29 2009 +0100

    Use PACKAGE_NAME instead of PACKAGE_STRING.
    
    Latter also contains the version, whoops.

commit ccc905e6b5ac542b4af1b7a97eb00978e54e1314
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Dec 10 14:05:22 2009 +0100

    Move the environment and files sections to the man page.
    
    The generated HTML does not change, because the sections
    are included in the manual xml file.

commit eb9de4c7bbd014d1df4a86e01c58845c773151b8
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Dec 10 13:53:20 2009 +0100

    Remove usage help from executable.
    
    Instead we try to open the manual page or print a message
    that refers to the man page or html documentation.

commit f6b58b5b50ab63b2a95c0101f3c4e7aa3edf05b7
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Dec 10 13:52:20 2009 +0100

    Drop old manual page.

commit 163520ce55b4012c5fe3c008a0ff67ca32f60dea
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Dec 10 13:51:02 2009 +0100

    Initial man page for terminal.
    
    Instead of providing Terminal --help we install a complete
    man-page for help. The docbook from which the man is generated
    is also used in the html documentation.
    
    This makes it easier to translate (no space indentation like
    we have in --help atm) and sharing the command line options
    help with the html pages.

 Makefile.am                             |    3 -
 Terminal.1                              |   83 -----
 configure.ac.in                         |    9 +-
 doc/Makefile.am                         |   97 ++++--
 doc/{Terminal.xsl => Terminal-html.xsl} |    0
 doc/Terminal-man.xsl                    |    4 +
 doc/Terminal.1.xml                      |  546 +++++++++++++++++++++++++++++++
 doc/Terminal.xml                        |  416 +++++-------------------
 terminal/main.c                         |  133 +++-----
 9 files changed, 754 insertions(+), 537 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 5139706..fc95a15 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -44,8 +44,6 @@ xml_in_files = Terminal-default-apps.xml.in
 xml_DATA = $(xml_in_files:.xml.in=.xml)
 @INTLTOOL_XML_RULE@
 
-man_MANS = Terminal.1
-
 uidir = $(datadir)/Terminal
 ui_DATA = \
 	Terminal-toolbars.ui \
@@ -59,7 +57,6 @@ EXTRA_DIST = \
 	intltool-update.in \
 	$(desktop_in_files) \
 	$(xml_in_files) \
-	$(man_MANS) \
 	$(ui_DATA)
 
 DISTCLEANFILES = \
diff --git a/Terminal.1 b/Terminal.1
deleted file mode 100644
index 81611c7..0000000
--- a/Terminal.1
+++ /dev/null
@@ -1,83 +0,0 @@
-.TH Terminal 1 "Mar 19, 2005"
-.SH NAME
-Terminal \- A Terminal emulator for X
-.SH SYNOPSIS
-.B Terminal
-.br
-.SH DESCRIPTION
-This manual page documents briefly the
-.B Terminal
-application.
-.PP
-\fBTerminal\fP is what is known as an X terminal emulator, often referred
-to as terminal or shell. It provides an equivalent to the old fashioned text
-screen on your desktop, but on which can easily the screen with other
-graphical applications.
-
-\fBTerminal\fP emulates the xterm application developed by the X Consortium.
-In turn, the xterm applications emulates the DEC VT102 terminal and also
-supports the DEC VT220 escape sequences. An escape sequence is a series of
-characters that with the Esc character. Terminal accepts all of the escape
-sequences that the VT102 and VT220 terminals use for functions such as to
-position the cursor and to clear the screen.
-
-
-.SH OPTIONS
-\fBTerminal\fP takes the following command line options:
-.TP
-.B \-\-help
-Print a help screen and exit.
-.TP
-.B \-\-version
-Output version information and exit.
-
-
-.SH ENVIRONMENT
-\fBTerminal\fP's behaviour is affected by the following environment
-variables.
-.PP
-.TP
-.B XDG_CONFIG_HOME
-Specifies the root for all user-specific configuration files. If this
-environment variable is unset, it defaults to
-.I ~/.config/
-.TP
-.B XDG_CONFIG_DIRS
-Set of preference ordered base directories relative to which configuration
-files should be searched in addition to the
-.B $XDG_CONFIG_HOME
-base directory. The directories should be separated with a colon.
-.TP
-.B XDG_DATA_HOME
-Specifies the root for all user-specific data files. If this environment
-variables is unset, it defaults to
-.I ~/.local/share/
-.TP
-.B XDG_DATA_DIRS
-Set of preference ordered base directories relative to which data
-files should be searched in addition to the
-.B $XDG_DATA_HOME
-base directory. The directories should be separated with a colon.
-
-
-.SH FILES
-\fBTerminal\fP reads its configuration from the files
-.IR $XDG_CONFIG_DIRS/Terminal/terminalrc .
-\fBTerminal\fP creates the toolbars layout from the files
-.IR $XDG_DATA_DIRS/Terminal/Terminal-toolbars.ui .
-If you customize the toolbars, the new toolbars layout
-is stored to
-.IR $XDG_DATA_HOME/Terminal/Terminal-toolbars.ui .
-
-
-.SH AUTHOR
-The \fBTerminal\fP software and this manual page was written
-for os-cillation by Benedikt Meurer <benny at xfce.org>.
-
-
-.SH "REPORTING BUGS"
-Report bugs to http://bugzilla.xfce.org/.
-
-
-.SH COPYRIGHT
-Copyright \(co 2003-2005 os-cillation.
diff --git a/configure.ac.in b/configure.ac.in
index e4853bf..0d37171 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -106,17 +106,22 @@ dnl ***************************************************
 dnl *** Check if we need to build the documentation ***
 dnl ***************************************************
 AC_ARG_ENABLE([gen-doc], [AC_HELP_STRING([--enable-gen-doc], 
-              [Generate HTML documentation [default=no]])],, [enable_gen_doc=no])
+              [Generate HTML documentation (requires xsltproc, xml2po and xmllint) [default=no]])],, [enable_gen_doc=no])
 if test x"$enable_gen_doc" = x"yes"; then
     AC_PATH_PROG([XSLTPROC], [xsltproc], [no])
     if test x"$XSLTPROC" = x"no"; then
         enable_gen_doc=no
     fi
-    
+
     AC_PATH_PROG([XML2PO], [xml2po], [no])
     if test x"$XML2PO" = x"no"; then
         enable_gen_doc=no
     fi
+
+    AC_PATH_PROG([XMLLINT], [xmllint], [no])
+    if test x"$XML2PO" = x"no"; then
+        enable_gen_doc=no
+    fi
 fi
 AM_CONDITIONAL([GENERATE_DOCUMENTATION], [test x"$enable_gen_doc" = x"yes"])
 
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 09afd58..b0ba12d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,8 +2,10 @@ SUBDIRS = \
 	images \
 	po
 
-STYLESHEET = $(PACKAGE).xsl
+HTML_STYLESHEET = $(PACKAGE)-html.xsl
+MAN_STYLESHEET = $(PACKAGE)-man.xsl
 DOCUMENT = $(PACKAGE).xml
+MANPAGE = $(PACKAGE).1.xml
 LINGUAS = $(shell cd $(srcdir)/po && echo `/bin/ls *.po | sed 's,[.]po,,g'`)
 ALL_LINGUAS = C $(LINGUAS)
 
@@ -22,6 +24,16 @@ install-data-local:
 				echo "--- Creating symlink to C images for $$lang"; \
 				ln -sf $(docdir)/C/images $(DESTDIR)$(docdir)/$$lang/images; \
 			fi \
+		fi; \
+		file=$(srcdir)/man/$$lang/$(PACKAGE).1; \
+		if test -f $$file ; then \
+			if test x"$$lang" = x"C"; then \
+				dest=$(DESTDIR)$(mandir)/man1; \
+			else \
+				dest=$(DESTDIR)$(mandir)/$$lang/man1; \
+			fi; \
+			$(mkinstalldirs) $$dest; \
+			$(INSTALL_DATA) $$file $$dest; \
 		fi \
 	done;
 
@@ -35,65 +47,84 @@ uninstall-local:
 			else \
 				rm -f $$dest/*.html; \
 			fi \
+		fi; \
+		if test x"$$lang" = x"C"; then \
+			dest=$(DESTDIR)$(mandir)/man1/$(PACKAGE).1; \
+		else \
+			dest=$(DESTDIR)$(mandir)/$$lang/man1/$(PACKAGE).1; \
+		fi; \
+		if test -f $$dest; then \
+			rm -f $$dest; \
 		fi \
 	done
 
 # remove generate html from the srcdir
 clean-local:
-	rm -rf $(srcdir)/html
+	rm -rf $(srcdir)/html $(srcdir)/man
 
 if GENERATE_DOCUMENTATION
 
 # regenerate po(t) files
 update-po:
 	rm -f $(srcdir)/po/$(GETTEXT_PACKAGE).pot; \
-	$(XML2PO) -o $(srcdir)/po/$(GETTEXT_PACKAGE).pot $(srcdir)/$(DOCUMENT); \
+	$(XML2PO) -o $(srcdir)/po/$(GETTEXT_PACKAGE).pot $(srcdir)/$(DOCUMENT) $(srcdir)/$(MANPAGE); \
 	for lang in $(LINGUAS); do \
 		pofile=$(srcdir)/po/$$lang.po; \
-		$(XML2PO) -u $(srcdir)/po/$$lang.po $(srcdir)/$(DOCUMENT); \
+		$(XML2PO) -u $(srcdir)/po/$$lang.po $(srcdir)/$(DOCUMENT) $(srcdir)/$(MANPAGE); \
 	done
 
-# build the (translated) html help files
-html-build.stamp: $(srcdir)/$(DOCUMENT) $(srcdir)/$(STYLESHEET)
+# build the translated help files
+doc-build.stamp: $(srcdir)/$(DOCUMENT) $(srcdir)/$(MANPAGE) $(srcdir)/$(HTML_STYLESHEET) $(srcdir)/$(MAN_STYLESHEET)
 	@chmod -R u+w $(srcdir); \
-	if test -d $(srcdir)/html; then \
-		rm -rf $(srcdir)/html; \
-	fi; \
+	rm -rf $(srcdir)/html $(srcdir)/man; \
+	echo; \
+	echo "*** Generating full XML file ***"; \
+	echo "Creating Terminal-options.xml"; \
+	sed -e "s,<refsect,<sect,g" \
+		-e "s,</refsect,</sect,g" $(srcdir)/$(MANPAGE) > Terminal-options.xml; \
+	echo "Creating single XML file for HTML manual"; \
+	$(XMLLINT) --nonet --xinclude --postvalid $(srcdir)/$(DOCUMENT) > xgen-xml; \
 	echo; \
 	for lang in $(ALL_LINGUAS); do \
 		pofile=$(srcdir)/po/$$lang.po; \
-		echo "*** Generating $$lang HTML documentation"; \
+		echo "*** Generating $$lang documentation"; \
 		if test x"$$lang" = x"C"; then \
-			cp $(srcdir)/$(DOCUMENT) xgen-doc; \
+			cp xgen-xml xgen-doc; \
+			cp $(srcdir)/$(MANPAGE) xgen-man; \
 		else \
-			echo "Building the translated DocBook XML file"; \
-			$(XML2PO) -e -l $$lang -p $$pofile $(srcdir)/$(DOCUMENT) > xgen-doc; \
+			echo "Building the translated DocBook XML files"; \
+			$(XML2PO) -e -l $$lang -p $$pofile xgen-xml > xgen-doc; \
+			$(XML2PO) -e -l $$lang -p $$pofile $(srcdir)/$(MANPAGE) > xgen-man; \
 			rm -f .xml2po.mo; \
 		fi; \
 		sed -e "s,\@PACKAGE_NAME\@,$(PACKAGE_NAME),g" \
 			-e "s,\@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g" \
-			-i xgen-doc; \
+			-i xgen-doc xgen-man; \
+		echo "Validating DocBook XML files"; \
+		$(XMLLINT) --noout --valid xgen-doc xgen-man; \
 		echo "Creating the HTML pages"; \
-		$(XSLTPROC) --nonet -o $(srcdir)/html/$$lang/ $(srcdir)/$(STYLESHEET) xgen-doc; \
-		chmod -R u+w $(srcdir)/html/$$lang; \
-		rm -f xgen-doc; \
+		$(XSLTPROC) --nonet -o $(srcdir)/html/$$lang/ $(srcdir)/$(HTML_STYLESHEET) xgen-doc; \
+		echo "Creating the MAN page"; \
+		$(XSLTPROC) --nonet -o $(srcdir)/man/$$lang/ $(srcdir)/$(MAN_STYLESHEET) xgen-man; \
+		chmod -R u+w $(srcdir)/html/$$lang $(srcdir)/man/$$lang; \
+		rm -f xgen-doc xgen-man; \
 		echo; \
 	done; \
-	touch html-build.stamp
+	rm -f xgen-xml Terminal-options.xml; \
+	touch doc-build.stamp
 
 dist-check-doc: all
 
 else
 
 update-po:
-	@echo "*** You need to compile with --enable-gen-doc in order to update-po"
-	@echo "*** This requires both the xml2po and xsltproc executables"
+	@echo "*** You need to compile with --enable-gen-doc in order to make update-po"
 	@false
 
-html-build.stamp:
-	@if test ! -d $(srcdir)/html; then \
+doc-build.stamp:
+	@if test ! -d $(srcdir)/html -a ! -d $(srcdir)/man; then \
 		echo; \
-		echo "*** No generated HTML documentation found. If you want to"; \
+		echo "*** No generated documentation found. If you want to"; \
 		echo "*** generate the (translated) documentation, run configure"; \
 		echo "*** with --enable-gen-doc."; \
 		echo; \
@@ -101,22 +132,25 @@ html-build.stamp:
 
 dist-check-doc:
 	@echo "*** You need to compile with --enable-gen-doc in order to make dist"
-	@echo "*** This requires both the xml2po and xsltproc executables"
 	@false
 
 endif
 
 # always try to build (if compiling with --enable-build-doc) or print
 # a message if no html files were found in the tarball
-all: html-build.stamp
+all: doc-build.stamp
 
-# include the html files in the dist
-dist-hook: dist-check-doc html-build.stamp
+# include the html and man files in the dist
+dist-hook: dist-check-doc doc-build.stamp
 	for lang in $(ALL_LINGUAS); do \
 		if test -d $(srcdir)/html/$$lang; then \
 			mkdir -p $(distdir)/html/$$lang; \
 			cp $(srcdir)/html/$$lang/* $(distdir)/html/$$lang/; \
 		fi; \
+		if test -d $(srcdir)/man/$$lang; then \
+			mkdir -p $(distdir)/man/$$lang; \
+			cp $(srcdir)/man/$$lang/* $(distdir)/man/$$lang/; \
+		fi; \
 	done
 
 # css file
@@ -126,10 +160,15 @@ css_DATA = \
 
 EXTRA_DIST = \
 	$(css_DATA) \
-	$(STYLESHEET) \
+	$(HTML_STYLESHEET) \
+	$(MAN_STYLESHEET) \
 	$(DOCUMENT) \
+	$(MANPAGE) \
 	README
 
 CLEANFILES = \
+	xgen-xml \
 	xgen-doc \
-	html-build.stamp
+	xgen-man \
+	Terminal-options.xml \
+	doc-build.stamp
diff --git a/doc/Terminal.xsl b/doc/Terminal-html.xsl
similarity index 100%
rename from doc/Terminal.xsl
rename to doc/Terminal-html.xsl
diff --git a/doc/Terminal-man.xsl b/doc/Terminal-man.xsl
new file mode 100644
index 0000000..e952599
--- /dev/null
+++ b/doc/Terminal-man.xsl
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"/>
+</xsl:stylesheet>
diff --git a/doc/Terminal.1.xml b/doc/Terminal.1.xml
new file mode 100644
index 0000000..ca099e1
--- /dev/null
+++ b/doc/Terminal.1.xml
@@ -0,0 +1,546 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5/EN"
+    "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+  <!ENTITY date "December 2009">
+  <!ENTITY version "@PACKAGE_VERSION@">
+  <!ENTITY application "@PACKAGE_NAME@">
+]>
+
+<refentry id="terminal" lang="en">
+  <refentryinfo>
+    <productname>&application;</productname>
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>Nick</firstname>
+        <surname>Schermer</surname>
+        <affiliation>
+          <address><email>nick at xfce.org</email></address>
+        </affiliation>
+      </author>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>Benedikt</firstname>
+        <surname>Meurer</surname>
+        <affiliation>
+          <jobtitle>Software developer</jobtitle>
+          <orgname>os-cillation</orgname>
+          <orgdiv>System development</orgdiv>
+          <address><email>benny at xfce.org</email></address>
+        </affiliation>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>&application;</refentrytitle>
+    <manvolnum>1</manvolnum>
+    <refmiscinfo class="version">0.4.2git-fa00dd5</refmiscinfo>
+    <refmiscinfo class="manual">Xfce</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname>&application;</refname>
+    <refpurpose>A Terminal emulator for X</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv id="synopsis">
+    <title>Synopsis</title>
+    <cmdsynopsis>
+      <command>Terminal</command>
+      <arg choice="opt" rep="repeat">--tab</arg>
+      <arg choice="opt" rep="repeat">--window</arg>
+    </cmdsynopsis>
+    <para>
+      Only the separating options are listed here; see below for the remainder.
+    </para>
+  </refsynopsisdiv>
+
+  <refsect1 id="description">
+    <title>Description</title>
+    <para>
+      &application; is what is known as an X terminal emulator, often referred
+      to as terminal or shell. It provides an equivalent to the old-fashioned
+      text screen on your desktop, but one which can easily share the screen
+      with other graphical applications. Windows users may already be familiar
+      with the MS-DOS Prompt utility, which has the analogous function of
+      offering a DOS command-line under Windows, though one should note that
+      the UNIX CLI offer far more power and ease of use than does DOS.
+    </para>
+
+    <para>
+      &application; emulates the <application>xterm</application> application
+      developed by the X Consortium. In turn, the <application>xterm</application>
+      application emulates the DEC VT102 terminal and also supports the DEC VT220
+      escape sequences. An escape sequence is a series of characters that start
+      with the <keycap>Esc</keycap> character. &application; accepts all of the escape
+      sequences that the VT102 and VT220 terminals use for functions such as to
+      position the cursor and to clear the screen.
+    </para>
+  </refsect1>
+
+  <refsect1 id="options">
+    <title>Options</title>
+
+    <refsect2 id="options-summary">
+      <title>Option Summary</title>
+      <para>
+        Here is a summary of all the options, grouped by type. Explanations are in
+        the following sections.
+      </para>
+      <variablelist>
+        <varlistentry>
+          <term><link linkend="options-general">General Options</link></term>
+          <listitem>
+            <para><xref linkend="options-general-help"/>;
+              <xref linkend="options-general-version"/>;
+              <xref linkend="options-general-disable-server"/>;
+              <xref linkend="options-general-default-display"/>;
+              <xref linkend="options-general-default-working-directory"/>
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><link linkend="options-separators">Window or Tab Separators</link></term>
+          <listitem>
+            <para><xref linkend="options-separators-tab"/>;
+              <xref linkend="options-separators-window"/>
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><link linkend="options-tab">Tab Options</link></term>
+          <listitem>
+            <para><xref linkend="options-tab-execute"/>;
+              <xref linkend="options-tab-command"/>;
+              <xref linkend="options-tab-working-directory"/>;
+              <xref linkend="options-tab-title"/>;
+              <xref linkend="options-tab-hold"/>
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><link linkend="options-window">Window Options</link></term>
+          <listitem>
+            <para><xref linkend="options-window-display"/>;
+              <xref linkend="options-window-geometry"/>;
+              <xref linkend="options-window-role"/>;
+              <xref linkend="options-window-startup-id"/>;
+              <xref linkend="options-window-icon"/>;
+              <xref linkend="options-window-fullscreen"/>;
+              <xref linkend="options-window-maximize"/>;
+              <xref linkend="options-window-show-menubar"/>,
+              <xref linkend="options-window-hide-menubar"/>;
+              <xref linkend="options-window-show-borders"/>,
+              <xref linkend="options-window-hide-borders"/>;
+              <xref linkend="options-window-show-toolbars"/>,
+              <xref linkend="options-window-hide-toolbars"/>
+            </para>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="options-general">
+      <title>General Options</title>
+      <variablelist>
+        <varlistentry>
+          <term id="options-general-help">
+            <option>-h</option>, <option>--help</option>
+          </term>
+          <listitem>
+            <para>List the various command line options supported by &application; and exit</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-general-version">
+            <option>-V</option>, <option>--version</option>
+          </term>
+          <listitem>
+            <para>Display version information and exit</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-general-disable-server">
+            <option>--disable-server</option>
+          </term>
+          <listitem>
+            <para>Do not register with the D-BUS session message bus</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-general-default-display">
+            <option>--default-display=<replaceable>display</replaceable></option>
+          </term>
+          <listitem>
+            <para>Default X display to use.</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-general-default-working-directory">
+            <option>--default-working-directory=<replaceable>directory</replaceable></option>
+          </term>
+          <listitem>
+            <para>Set <parameter>directory</parameter> as the default working directory for the terminal</para>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="options-separators">
+      <title>Window or Tab Separators</title>
+      <variablelist>
+        <varlistentry>
+          <term id="options-separators-tab">
+            <option>--tab</option>
+          </term>
+          <listitem>
+            <para>Open a new tab in the last-specified window; more than one of these options can be provided.</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-separators-window">
+            <option>--window</option>
+          </term>
+          <listitem>
+            <para>Open a new window containing one tab; more than one of these options can be provided.</para>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="options-tab">
+      <title>Tab Options</title>
+      <variablelist>
+        <varlistentry>
+          <term id="options-tab-execute">
+            <option>-x</option>, <option>--execute</option>
+          </term>
+          <listitem>
+            <para>Execute the remainder of the command line inside the terminal</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-tab-command">
+            <option>-e</option>, <option>--command=<replaceable>command</replaceable></option>
+          </term>
+          <listitem>
+            <para>Execute <parameter>command</parameter> inside the terminal</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-tab-working-directory">
+            <option>--working-directory=<replaceable>directory</replaceable></option>
+          </term>
+          <listitem>
+            <para>Set <parameter>directory</parameter> as the working directory for the terminal</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-tab-title">
+            <option>-T</option>, <option>--title=<replaceable>title</replaceable></option>
+          </term>
+          <listitem>
+            <para>Set <parameter>title</parameter> as the initial window title for the terminal</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-tab-hold">
+            <option>-H</option>, <option>--hold</option>
+          </term>
+          <listitem>
+            <para>Causes the terminal to be kept around after the child command has terminated</para>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+    </refsect2>
+
+    <refsect2 id="options-window">
+      <title>Window Options</title>
+      <variablelist>
+        <varlistentry>
+          <term id="options-window-display">
+            <option>--display=<replaceable>display</replaceable></option>
+          </term>
+          <listitem>
+            <para>X display to use for the last- specified window.</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-window-geometry">
+            <option>--geometry=<replaceable>geometry</replaceable></option>
+          </term>
+          <listitem>
+            <para>
+              Sets the geometry of the last-specified window to <parameter>geometry</parameter>. Read
+              <citerefentry><refentrytitle>X</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+              for more information on how to specify window geometries.
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-window-role">
+            <option>--role=<replaceable>role</replaceable></option>
+          </term>
+          <listitem>
+            <para>
+              Sets the window role of the last-specified window to <parameter>role</parameter>.
+              Applies to only one window and can be specified once for each window you create
+              from the command line. It is mostly used for session management inside &application;
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-window-startup-id">
+            <option>--startup-id=<replaceable>string</replaceable></option>
+          </term>
+          <listitem>
+            <para>
+              Specifies the startup notification id for the last-specified window. Used
+              internally to forward the startup notification id when using the D-BUS service.
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-window-icon">
+            <option>-I, --icon=<replaceable>icon</replaceable></option>
+          </term>
+          <listitem>
+            <para>
+              Set the terminal's icon as an icon name or filename.
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-window-fullscreen">
+            <option>--fullscreen</option>
+          </term>
+          <listitem>
+            <para>
+              Set the last-specified window into fullscreen mode; applies to only one window;
+              can be specified once for each window you create from the command line.
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-window-maximize">
+            <option>--maximize</option>
+          </term>
+          <listitem>
+            <para>
+              Set the last-specified window into maximized mode; applies to only one
+              window; can be specified once for each window you create from the command line.
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-window-show-menubar">
+            <option>--show-menubar</option>
+          </term>
+          <listitem>
+            <para>
+              Turn on the menubar for the last-specified window. Can be specified once for each
+              window you create from the command line.
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-window-hide-menubar">
+            <option>--hide-menubar</option>
+          </term>
+          <listitem>
+            <para>
+              Turn off the menubar for the last-specified window. Can be specified once for each
+              window you create from the command line.
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-window-show-borders">
+            <option>--show-borders</option>
+          </term>
+          <listitem>
+            <para>
+              Turn on the window decorations for the last-specified window. Applies to only
+              one window. Can be specified once for each window you create from the command line.
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-window-hide-borders">
+            <option>--hide-borders</option>
+          </term>
+          <listitem>
+            <para>
+              Turn off the window decorations for the last-specified window. Applies to only
+              one window. Can be specified once for each window you create from the command line.
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-window-show-toolbars">
+            <option>--show-toolbars</option>
+          </term>
+          <listitem>
+            <para>
+              Turn on the toolbars for the last-specified window. Applies to only one window. Can
+              be specified once for each window you create from the command line.
+            </para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term id="options-window-hide-toolbars">
+            <option>--hide-toolbars</option>
+          </term>
+          <listitem>
+            <para>
+              Turn off the toolbars for the last-specified window. Applies to only one window. Can
+              be specified once for each window you create from the command line.
+            </para>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+    </refsect2>
+  </refsect1>
+
+  <refsect1 id="examples">
+    <title>Examples</title>
+    <variablelist>
+      <varlistentry>
+        <term>&application; --geometry 80x40 --command mutt --tab --command mc</term>
+        <listitem>
+          <para>
+            Opens a new new terminal window with a geometry of 80 columns and 40 rows
+            and two tabs in it, where the first tab runs <command>mutt</command> and
+            the second tab runs <command>mc</command>.
+          </para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1 id="environment">
+    <title>Environment</title>
+
+    <para>
+      Terminal uses the Basedir Specification as defined on
+      <ulink url="http://freedesktop.org/" type="http">Freedesktop.org</ulink> to locate its
+      data and configuration files. This means that file locations will be specified as
+      a path relative to the directories described in the specification.
+    </para>
+
+    <variablelist>
+      <varlistentry>
+        <term><varname>${XDG_CONFIG_HOME}</varname></term>
+        <listitem>
+          <para>
+            The first base directory to look for configuration
+            files. By default this is set to <filename role="directory">~/.config/</filename>.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><varname>${XDG_CONFIG_DIRS}</varname></term>
+        <listitem>
+          <para>
+            A colon separated list of base directories that contain configuration
+            data. By default the application will look in <filename role="directory">${sysconfdir}/xdg/</filename>.
+            The value of <varname>${sysconfdir}</varname> depends on how the program was
+            build and will often be <filename role="directory">/etc/</filename>
+            for binary packages.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><varname>${XDG_DATA_HOME}</varname></term>
+        <listitem>
+          <para>
+            The root for all user-specific data files. By default this
+            is set to <filename role="directory">~/.local/share/</filename>.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><varname>${XDG_DATA_DIRS}</varname></term>
+        <listitem>
+          <para>
+            A set of preference ordered base directories relative to which
+            data files should be searched in addition to the
+            <varname>${XDG_DATA_HOME}</varname> base directory. The directories
+            should be separated with a colon.
+          </para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1 id="files">
+    <title>Files</title>
+
+    <variablelist>
+      <varlistentry>
+        <term><filename>${XDG_CONFIG_DIRS}/Terminal/terminalrc</filename></term>
+        <listitem>
+          <para>
+            This is the location of the configuration file that includes the
+            preferences which control the look and feel of &application;.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><filename>${XDG_DATA_DIRS}/Terminal/Terminal-toolbars.ui</filename></term>
+        <listitem>
+          <para>
+            This file includes the user interface definition for the toolbars. If
+            you customize the toolbars using the graphical toolbars editor, &application;
+            will store the new toolbars layout in the file
+            <filename>${XDG_DATA_HOME}/Terminal/Terminal-toolbars.ui</filename>.
+          </para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1 id="seealso">
+    <title>See also</title>
+    <para>
+      <citerefentry>
+        <refentrytitle>bash</refentrytitle>
+        <manvolnum>1</manvolnum>
+      </citerefentry>,
+      <citerefentry>
+        <refentrytitle>X</refentrytitle>
+        <manvolnum>7</manvolnum>
+      </citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/doc/Terminal.xml b/doc/Terminal.xml
index 3e99549..d0bfa7d 100644
--- a/doc/Terminal.xml
+++ b/doc/Terminal.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
-    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
-  <!ENTITY date "May 2008">
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+    "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+  <!ENTITY date "December 2009">
   <!ENTITY version "@PACKAGE_VERSION@">
   <!ENTITY application "@PACKAGE_NAME@">
 ]>
@@ -44,10 +44,10 @@
         <firstname>Benedikt</firstname>
         <surname>Meurer</surname>
         <affiliation>
-          <address><email>benny at xfce.org</email></address>
+          <jobtitle>Software developer</jobtitle>
           <orgname>os-cillation</orgname>
           <orgdiv>System development</orgdiv>
-          <jobtitle>Software developer</jobtitle>
+          <address><email>benny at xfce.org</email></address>
         </affiliation>
       </author>
 
@@ -64,7 +64,6 @@
         <surname>Schermer</surname>
         <affiliation>
           <address><email>nick at xfce.org</email></address>
-          <jobtitle>Xfce Core Developer</jobtitle>
         </affiliation>
       </author>
     </authorgroup>
@@ -125,33 +124,51 @@
 
       <itemizedlist>
         <listitem>
-          Multiple tabs per window
+          <para>
+            Multiple tabs per window
+          </para>
         </listitem>
         <listitem>
-          Customizable toolbars, which can be changed using an integrated graphical toolbar editor
+          <para>
+            Customizable toolbars, which can be changed using an integrated graphical toolbar editor
+          </para>
         </listitem>
         <listitem>
-          Ability to configure nearly every aspect of &application; in the <guilabel>Preferences</guilabel> dialog plus a
-          bunch of so called <emphasis>hidden options</emphasis>
+          <para>
+            Ability to configure nearly every aspect of &application; in the <guilabel>Preferences</guilabel> dialog plus a
+            bunch of so called <emphasis>hidden options</emphasis>
+          </para>
         </listitem>
         <listitem>
-          Good integration with the <ulink url="http://xfce.org/">Xfce desktop environment</ulink> in particular, but also with every other Linux desktop
+          <para>
+            Good integration with the <ulink url="http://xfce.org/">Xfce desktop environment</ulink> in particular, but also with every other Linux desktop
+          </para>
         </listitem>
         <listitem>
-          Session management support
+          <para>
+            Session management support
+          </para>
         </listitem>
         <listitem>
-          Real multihead support (both MultiScreen and Xinerama mode)
+          <para>
+            Real multihead support (both MultiScreen and Xinerama mode)
+          </para>
         </listitem>
         <listitem>
-          Standards compliance (see the <ulink url="http://freedesktop.org/">freedesktop.org</ulink> website)
+          <para>
+            Standards compliance (see the <ulink url="http://freedesktop.org/">freedesktop.org</ulink> website)
+          </para>
         </listitem>
         <listitem>
-          <ulink url="http://dbus.freedesktop.org/">D-BUS</ulink> based terminal service facility to minimize the overall resource usage
+          <para>
+            <ulink url="http://dbus.freedesktop.org/">D-BUS</ulink> based terminal service facility to minimize the overall resource usage
+          </para>
         </listitem>
         <listitem>
-          High degree of maintainability by making best use of <ulink url="http://developer.gnome.org/doc/API/2.0/gtk/">GTK+</ulink>
-          and <ulink url="http://developer.gnome.org/doc/API/2.0/gobject/">GObject</ulink>.
+          <para>
+            High degree of maintainability by making best use of <ulink url="http://developer.gnome.org/doc/API/2.0/gtk/">GTK+</ulink>
+            and <ulink url="http://developer.gnome.org/doc/API/2.0/gobject/">GObject</ulink>.
+          </para>
         </listitem>
       </itemizedlist>
 
@@ -806,29 +823,35 @@
           <listitem>
             <para>Select a background for the terminal window. The options are as follows:</para>
 
-            <itemizedlist>
-              <listitem>
-                <guilabel>None (use solid color)</guilabel>
-                <para>Select this option to use the background color that is specified
-                in the <guilabel>Colors</guilabel> section as the background color for
-                the terminal.</para>
-              </listitem>
-              <listitem>
-                <guilabel>Background image</guilabel>
-                <para>Select this option to use an image file as the background for the
-                terminal. Use the <guilabel>Image file</guilabel> entry box to
-                specify the location and name of the image file. Alternatively, click on
-                the button besides the entry box to search for and select the image
-                file.</para>
-                <para>Use the <guilabel>Style</guilabel> option to control the appearance
-                of the background image. &application; supports tiling, centering, scaling and
-                stretching background images.</para>
-              </listitem>
-              <listitem>
-                <guilabel>Transparent background</guilabel>
-                <para>Select this option to use a transparent background for the terminal.</para>
-              </listitem>
-            </itemizedlist>
+            <variablelist>
+              <varlistentry>
+                <term><guilabel>None (use solid color)</guilabel></term>
+                <listitem>
+                  <para>Select this option to use the background color that is specified
+                  in the <guilabel>Colors</guilabel> section as the background color for
+                  the terminal.</para>
+                </listitem>
+              </varlistentry>
+              <varlistentry>
+                <term><guilabel>Background image</guilabel></term>
+                <listitem>
+                  <para>Select this option to use an image file as the background for the
+                  terminal. Use the <guilabel>Image file</guilabel> entry box to
+                  specify the location and name of the image file. Alternatively, click on
+                  the button besides the entry box to search for and select the image
+                  file.</para>
+                  <para>Use the <guilabel>Style</guilabel> option to control the appearance
+                  of the background image. &application; supports tiling, centering, scaling and
+                  stretching background images.</para>
+                </listitem>
+              </varlistentry>
+              <varlistentry>
+                <term><guilabel>Transparent background</guilabel></term>
+                <listitem>
+                  <para>Select this option to use a transparent background for the terminal.</para>
+                </listitem>
+              </varlistentry>
+            </variablelist>
 
             <para>If you have selected <guilabel>Background image</guilabel> or <guilabel>Transparent
             background</guilabel>, you can use the slider <guilabel>Shade transparent or image
@@ -1030,304 +1053,25 @@
     </sect2>
   </sect1>
 
+  <sect1 id="command-line">
+    <title>Command line options</title>
+    <xi:include href="Terminal-options.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude"
+                xpointer="xpointer(//sect1[@id='options']/title/following-sibling::*)"/>
+  </sect1>
 
   <sect1 id="advanced">
     <title>Advanced topics</title>
-    <sect2 id="command-line-options">
-      <title>Command line Options</title>
-
-      <para>
-        When &application; is started from the command line or from a panel launcher, several options
-        can be specified to modify its behavior.
-      </para>
-
-      <variablelist>
-        <varlistentry>
-          <term><option>--help</option></term>
-          <listitem>
-            <para>List the various command line options supported by &application; and exit</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--version</option></term>
-          <listitem>
-            <para>Display version information and exit</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--disable-server</option></term>
-          <listitem>
-            <para>
-              Do not register with the D-BUS session message bus
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--execute</option> <parameter>...</parameter></term>
-          <listitem>
-            <para>Execute the remainder of the command line inside the terminal</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--command</option> <parameter>command</parameter></term>
-          <listitem>
-            <para>Execute <parameter>command</parameter> inside the terminal</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--working-directory</option> <parameter>directory</parameter></term>
-          <listitem>
-            <para>Set <parameter>directory</parameter> as the working directory for the terminal</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--title</option> <parameter>title</parameter></term>
-          <listitem>
-            <para>Set <parameter>title</parameter> as the initial window title for the terminal</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--hold</option></term>
-          <listitem>
-            <para>Causes the terminal to be kept around after the child command has terminated</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--display</option> <parameter>display</parameter></term>
-          <listitem>
-            <para>Open terminal window on the X screen specified by <parameter>display</parameter>.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--geometry</option> <parameter>geometry</parameter></term>
-          <listitem>
-            <para>
-              Sets the geometry of the last-specified window to <parameter>geometry</parameter>. Read
-              <userinput><command>man</command> <option>X</option></userinput> for more information on how
-              to specify window geometries.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--role</option> <parameter>role</parameter></term>
-          <listitem>
-            <para>
-              Sets the window role of the last-specified window to <parameter>role</parameter>. Applies
-              to only one window and can be specified once for each window you create from the command
-              line. It is mostly used for session management inside &application;.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--startup-id</option> <parameter>id</parameter></term>
-          <listitem>
-            <para>
-              Specifies the startup notification id for the last-specified window. Used internally
-              to forward the startup notification id when using the D-BUS service.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--fullscreen</option></term>
-          <listitem>
-            <para>
-              Set the last-specified window into fullscreen mode;
-              applies to only one window; can be specified once
-              for each window you create from the command line.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--maximize</option></term>
-          <listitem>
-            <para>
-              Set the last-specified window into maximized mode;
-              applies to only one window; can be specified once
-              for each window you create from the command line.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--show-menubar</option></term>
-          <listitem>
-            <para>
-              Turn on the menubar for the last-specified window. Can be specified once for each
-              window you create from the command line.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--hide-menubar</option></term>
-          <listitem>
-            <para>
-              Turn off the menubar for the last-specified window. Can be specified once for each
-              window you create from the command line.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--show-borders</option></term>
-          <listitem>
-            <para>
-              Turn on the window decorations for the last-specified window. Applies to only
-              one window. Can be specified once for each window you create from the command line.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--hide-borders</option></term>
-          <listitem>
-            <para>
-              Turn off the window decorations for the last-specified window. Applies to only
-              one window. Can be specified once for each window you create from the command line.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--show-toolbars</option></term>
-          <listitem>
-            <para>
-              Turn on the toolbars for the last-specified window. Applies to only one window. Can
-              be specified once for each window you create from the command line.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--hide-toolbars</option></term>
-          <listitem>
-            <para>
-              Turn off the toolbars for the last-specified window. Applies to only one window. Can
-              be specified once for each window you create from the command line.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--tab</option></term>
-          <listitem>
-            <para>
-              Open a new tab in the last-specified window. More than one of these options can be provided.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--window</option></term>
-          <listitem>
-            <para>
-              Open a new window containing one tab. More than one of these options can be provided.
-            </para>
-          </listitem>
-        </varlistentry>
-      </variablelist>
-
-      <para>
-        For example, say you want to open a new terminal window with two tabs in it, where the first
-        tab should run <command>mutt</command> and the second tab should run <command>mc</command>,
-        and the window should have 80 columns and 40 rows, then you would use the following command
-        to start Terminal:
-      </para>
-
-      <screen>Terminal --geometry 80x40 --command mutt --tab --command mc</screen>
-
-    </sect2>
-
     <sect2 id="files-and-env-vars">
       <title>Files and Environment Variables</title>
 
-      <para>
-        Terminal uses the Basedir Specification as defined on <ulink url="http://freedesktop.org/" type="http">Freedesktop.org</ulink> to locate its data and configuration files. This means
-        that file locations will be specified as a path relative to the directories described in
-        the specification.
-      </para>
-
-      <variablelist>
-        <varlistentry>
-          <term><varname>${XDG_CONFIG_HOME}</varname></term>
-          <listitem>
-            <para>
-              The first base directory to look for configuration
-              files. By default this is set to <filename role="directory">~/.config/</filename>.
-            </para>
-          </listitem>
-        </varlistentry>
+      <xi:include href="Terminal-options.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude"
+                xpointer="xpointer(//sect1[@id='environment']/title/following-sibling::*)"/>
 
-        <varlistentry>
-          <term><varname>${XDG_CONFIG_DIRS}</varname></term>
-          <listitem>
-            <para>
-              A colon separated list of base directories that contain configuration
-              data. By default the application will look in <filename role="directory">${sysconfdir}/xdg/</filename>. The value of
-              <varname>${sysconfdir}</varname> depends on how the program was
-              build and will often be <filename role="directory">/etc/</filename>
-              for binary packages.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>${XDG_DATA_HOME}</varname></term>
-          <listitem>
-            <para>
-              The root for all user-specific data files. By default this
-              is set to <filename role="directory">~/.local/share/</filename>.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>${XDG_DATA_DIRS}</varname></term>
-          <listitem>
-            <para>
-              A set of preference ordered base directories relative to which
-              data files should be searched in addition to the
-              <varname>${XDG_DATA_HOME}</varname> base directory. The directories
-              should be separated with a colon.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><filename>${XDG_CONFIG_DIRS}/Terminal/terminalrc</filename></term>
-          <listitem>
-            <para>
-              This is the location of the configuration file that includes the
-              preferences which control the look and feel of &application;.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><filename>${XDG_DATA_DIRS}/Terminal/Terminal-toolbars.ui</filename></term>
-          <listitem>
-            <para>
-              This file includes the user interface definition for the toolbars. If
-              you customize the toolbars using the graphical toolbars editor, &application;
-              will store the new toolbars layout in the file
-              <filename>${XDG_DATA_HOME}/Terminal/Terminal-toolbars.ui</filename>.
-            </para>
-          </listitem>
-        </varlistentry>
-      </variablelist>
+      <xi:include href="Terminal-options.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude"
+                xpointer="xpointer(//sect1[@id='files']/title/following-sibling::*)"/>
     </sect2>
 
     <sect2 id="hidden-options">
@@ -1434,7 +1178,7 @@ MiscHighlightUrls=TRUE</programlisting>
           <term><varname>MiscDefaultGeometry</varname></term>
           <listitem>
             <para>
-              The default geometry for new Terminal windows if no <option>--geometry</option>
+              The default geometry for new Terminal windows if no <xref linkend="options-window-geometry"/>
               option is specified on the command line (defaults to <literal>80x24</literal>).
             </para>
           </listitem>
@@ -1523,7 +1267,7 @@ MiscHighlightUrls=TRUE</programlisting>
     question that relate to working with &application;, or even terminal emulators in general. If
     you know of a question that's missing from this page, please <ulink url="http://bugzilla.xfce.org/enter_bug.cgi?product=Terminal&format=guided">file a request</ulink>.</para>
 
-    <sect3>
+    <sect2>
       <title>&application; complains about <literal>Unable to start terminal server: Unable to connect
         to D-BUS message daemon</literal>, what can I do?</title>
 
@@ -1537,15 +1281,15 @@ MiscHighlightUrls=TRUE</programlisting>
       <literal>dbus-launch xfce4-session</literal> or use <literal>dbus-launch startxfce4</literal>
       to start Xfce instead. If you don't use Xfce, please look at the documentation of your
       desktop environment on how to enable the D-BUS session daemon.</para>
-    </sect3>
+    </sect2>
 
-    <sect3>
+    <sect2>
       <title><keycap>Home</keycap> and <keycap>End</keycap> keys don't work in &application;, what's wrong?</title>
 
       <para>This problem is actually a bug in <ulink url="http://developer.gnome.org/arch/gnome/widgets/vte.html">vte</ulink>,
       the terminal widget used by &application;. A patch for vte that fixes the problem is available <ulink url="http://lunar-linux.org/lunar/patches/vte-0.11.11-termcap.patch">here</ulink> (this patch was created
       with version 0.11.11 of vte, it may not work with other versions). Thanks to Auke Kok for this patch.</para>
-    </sect3>
+    </sect2>
   </sect1>
 
   <sect1 id="support">
diff --git a/terminal/main.c b/terminal/main.c
index ff9a330..5b65d79 100644
--- a/terminal/main.c
+++ b/terminal/main.c
@@ -43,90 +43,55 @@
 static void
 usage (void)
 {
-  g_print ("%s\n", _("Usage:"));
-  g_print ("  %s [%s...]\n", PACKAGE_NAME, _("OPTION"));
-  g_print ("\n");
-  g_print ("%s:\n", _("General Options"));
-  g_print ("%s\n", _("  -h, --help                          Print this help message and exit"));
-  g_print ("%s\n", _("  -V, --version                       Print version information and exit"));
-  g_print ("%s\n", _("  --disable-server                    Do not register with the D-BUS\n"
-                     "                                      session message bus"));
-  g_print ("%s\n", _("  --default-display=DISPLAY           default X display to use"));
-  g_print ("%s\n", _("  --default-working-directory=DIRNAME Set the default terminal's working\n"
-                     "                                      directory"));
-  g_print ("\n");
-  g_print ("%s:\n", _("Window or Tab Separators"));
-  g_print ("%s\n", _("  --tab                               Open a new tab in the last-specified\n"
-                     "                                      window; more than one of these\n"
-                     "                                      options can be provided"));
-  g_print ("%s\n", _("  --window                            Open a new window containing one tab;\n"
-                     "                                      more than one of these options can be\n"
-                     "                                      provided"));
-  g_print ("\n");
-  g_print ("%s:\n", _("Tab Options"));
-  g_print ("%s\n", _("  -x, --execute                       Execute the remainder of the command\n"
-                     "                                      line inside the terminal"));
-  g_print ("%s\n", _("  -e, --command=STRING                Execute the argument to this option\n"
-                     "                                      inside the terminal"));
-  g_print ("%s\n", _("  --working-directory=DIRNAME         Set the terminal's working directory"));
-  g_print ("%s\n", _("  -T, --title=TITLE                   Set the terminal's title"));
-  g_print ("%s\n", _("  -H, --hold                          Do not immediately destroy the tab\n"
-                     "                                      when the child command exits"));
-  g_print ("\n");
-  g_print ("%s:\n", _("Window Options"));
-  g_print ("%s\n", _("  --display=DISPLAY                   X display to use for the last-\n"
-                     "                                      specified window"));
-  g_print ("%s\n", _("  --geometry=GEOMETRY                 X geometry specification (see \"X\"\n"
-                     "                                      man page), can be specified once per\n"
-                     "                                      window to be opened"));
-  g_print ("%s\n", _("  --role=ROLE                         Set the role for the last-specified\n"
-                     "                                      window; applies to only one window;\n"
-                     "                                      can be specified once for each window\n"
-                     "                                      you create from the command line"));
-  g_print ("%s\n", _("  --startup-id=STRING                 ID for the startup notification\n"
-                     "                                      protocol"));
-  g_print ("%s\n", _("  -I, --icon=ICON                     Set the terminal's icon as an icon\n"
-                     "                                      name or filename"));
-  g_print ("%s\n", _("  --fullscreen                        Set the last-specified window into\n"
-                     "                                      fullscreen mode; applies to only one\n"
-                     "                                      window; can be specified once for\n"
-                     "                                      each window you create from the\n"
-                     "                                      command line"));
-  g_print ("%s\n", _("  --maximize                          Maximize the last-specified window;\n"
-                     "                                      applies to only one window; can be\n"
-                     "                                      specified once for each window you\n"
-                     "                                      create from the command line"));
-  g_print ("%s\n", _("  --show-menubar                      Turn on the menubar for the last-\n"
-                     "                                      specified window; applies to only one\n"
-                     "                                      window; can be specified once for\n"
-                     "                                      each window you create from the\n"
-                     "                                      command line"));
-  g_print ("%s\n", _("  --hide-menubar                      Turn off the menubar for the last-\n"
-                     "                                      specified window; applies to only one\n"
-                     "                                      window; can be specified once for\n"
-                     "                                      each window you create from the\n"
-                     "                                      command line"));
-  g_print ("%s\n", _("  --show-borders                      Turn on the window decorations for\n"
-                     "                                      the last-specified window; applies\n"
-                     "                                      to only one window; can be specified\n"
-                     "                                      once for each window you create from\n"
-                     "                                      the command line"));
-  g_print ("%s\n", _("  --hide-borders                      Turn off the window decorations for\n"
-                     "                                      the last-specified window; applies\n"
-                     "                                      to only one window; can be specified\n"
-                     "                                      once for each window you create from\n"
-                     "                                      the command line"));
-  g_print ("%s\n", _("  --show-toolbars                     Turn on the toolbars for the last-\n"
-                     "                                      specified window; applies to only one\n"
-                     "                                      window; can be specified once for\n"
-                     "                                      each window you create from the\n"
-                     "                                      command line"));
-  g_print ("%s\n", _("  --hide-toolbars                     Turn off the toolbars for the last-\n"
-                     "                                      specified window; applies to only one\n"
-                     "                                      window; can be specified once for\n"
-                     "                                      each window you create from the\n"
-                     "                                      command line"));
-  g_print ("\n");
+  g_print ("%s\n"
+           "  %s [%s...]\n\n",
+           _("Usage:"), PACKAGE_NAME, _("OPTION"));
+
+  g_print ("%s:\n"
+           "  -h, --help; -V, --version; --disable-server;\n"
+           "  --default-display=%s; --default-working-directory=%s\n\n",
+           _("General Options"),
+           /* parameter of --default-display */
+           _("display"),
+           /* parameter of --default-working-directory */
+           _("directory"));
+
+  g_print ("%s:\n"
+           "  --tab; --window\n\n",
+           _("Window or Tab Separators"));
+
+  g_print ("%s:\n"
+           "  -x, --execute; -e, --command=%s; -T, --title=%s;\n"
+           "  --working-directory=%s; -H, --hold\n\n",
+           _("Tab Options"),
+           /* parameter of --command */
+           _("command"),
+           /* parameter of --title */
+           _("title"),
+           /* parameter of --working-directory */
+           _("directory"));
+
+  g_print ("%s:\n"
+           "  --display=%s; --geometry=%s; --role=%s;\n"
+           "  --startup-id=%s; -I, --icon=%s; --fullscreen; --maximize;\n"
+           "  --show-menubar, --hide-menubar; --show-borders, --hide-borders;\n"
+           "  --show-toolbars, --hide-toolbars\n\n",
+           _("Window Options"),
+           /* parameter of --display */
+           _("display"),
+           /* parameter of --geometry */
+           _("geometry"),
+           /* parameter of --role */
+           _("role"),
+           /* parameter of --startup-id */
+           _("string"),
+           /* parameter of --icon */
+           _("icon"));
+
+  g_print (_("See the %s man page for full explanation of the options above."),
+           PACKAGE_NAME);
+
+  g_print ("\n\n");
 }
 
 



More information about the Xfce4-commits mailing list