Added documentation for the help browser

This commit is contained in:
Pierre Pronchery 2012-10-14 17:27:04 +00:00
parent 39ff7279d9
commit 217ceea871
8 changed files with 170 additions and 4 deletions

View File

@ -34,6 +34,7 @@ dist:
$(PACKAGE)-$(VERSION)/doc/Makefile \
$(PACKAGE)-$(VERSION)/doc/docbook.sh \
$(PACKAGE)-$(VERSION)/doc/download.xml \
$(PACKAGE)-$(VERSION)/doc/helper.xml \
$(PACKAGE)-$(VERSION)/doc/surfer.xml \
$(PACKAGE)-$(VERSION)/doc/project.conf \
$(PACKAGE)-$(VERSION)/po/Makefile \

View File

@ -1,4 +1,6 @@
download.1
download.html
helper.1
helper.html
surfer.1
surfer.html

View File

@ -1,4 +1,4 @@
TARGETS = download.1 download.html surfer.1 surfer.html
TARGETS = download.1 download.html helper.1 helper.html surfer.1 surfer.html
PREFIX = /usr/local
DESTDIR =
RM ?= rm -f
@ -15,6 +15,12 @@ download.1: download.xml
download.html: download.xml
./docbook.sh -P "$(PREFIX)" -- "download.html"
helper.1: helper.xml
./docbook.sh -P "$(PREFIX)" -- "helper.1"
helper.html: helper.xml
./docbook.sh -P "$(PREFIX)" -- "helper.html"
surfer.1: surfer.xml
./docbook.sh -P "$(PREFIX)" -- "surfer.1"
@ -22,7 +28,7 @@ surfer.html: surfer.xml
./docbook.sh -P "$(PREFIX)" -- "surfer.html"
clean:
$(RM) -- $(download.1_OBJS) $(download.html_OBJS) $(surfer.1_OBJS) $(surfer.html_OBJS)
$(RM) -- $(download.1_OBJS) $(download.html_OBJS) $(helper.1_OBJS) $(helper.html_OBJS) $(surfer.1_OBJS) $(surfer.html_OBJS)
distclean: clean
$(RM) -- $(TARGETS)
@ -30,12 +36,16 @@ distclean: clean
install: $(TARGETS)
./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "download.1"
./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "download.html"
./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "helper.1"
./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "helper.html"
./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "surfer.1"
./docbook.sh -P "$(DESTDIR)$(PREFIX)" -i -- "surfer.html"
uninstall:
./docbook.sh -P "$(DESTDIR)$(PREFIX)" -u -- "download.1"
./docbook.sh -P "$(DESTDIR)$(PREFIX)" -u -- "download.html"
./docbook.sh -P "$(DESTDIR)$(PREFIX)" -u -- "helper.1"
./docbook.sh -P "$(DESTDIR)$(PREFIX)" -u -- "helper.html"
./docbook.sh -P "$(DESTDIR)$(PREFIX)" -u -- "surfer.1"
./docbook.sh -P "$(DESTDIR)$(PREFIX)" -u -- "surfer.html"

View File

@ -95,6 +95,10 @@
<refsect1 id="see_also">
<title>See also</title>
<para>
<citerefentry>
<refentrytitle>helper</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>surfer</refentrytitle>
<manvolnum>1</manvolnum>

123
doc/helper.xml Normal file
View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY firstname "Pierre">
<!ENTITY surname "Pronchery">
<!ENTITY username "khorben">
<!ENTITY email "khorben@defora.org">
<!ENTITY section "1">
<!ENTITY title "Surfer User Manual">
<!ENTITY package "DeforaOS Surfer">
<!ENTITY name "helper">
<!ENTITY purpose "Help browser">
]>
<refentry>
<refentryinfo>
<title>&title;</title>
<productname>&package;</productname>
<authorgroup>
<author>
<firstname>&firstname;</firstname>
<surname>&surname;</surname>
<contrib>Code and documentation.</contrib>
<address>
<email>&email;</email>
</address>
</author>
</authorgroup>
<copyright>
<year>2012</year>
<holder>&firstname; &surname; &lt;&email;&gt;</holder>
</copyright>
<legalnotice>
<para>This manual page was written for the DeforaOS project (and may be
used by others).</para>
<para>Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU General Public License,
Version 3 as published by the Free Software Foundation.</para>
</legalnotice>
</refentryinfo>
<refmeta>
<refentrytitle>&name;</refentrytitle>
<manvolnum>&section;</manvolnum>
</refmeta>
<refnamediv>
<refname>&name;</refname>
<refpurpose>&purpose;</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>&name;</command>
<arg choice="opt"><option>-c</option></arg>
<arg choice="opt"><option>-p</option>
<replaceable>package</replaceable></arg>
<arg>command</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>&name;</command>
<arg choice="plain"><option>-d</option>
<replaceable>package</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>&name;</command>
<arg choice="plain"><option>-s</option> <replaceable>section</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 id="description">
<title>Description</title>
<para><command>&name;</command> is a help browser for the desktop.</para>
</refsect1>
<refsect1 id="options">
<title>Options</title>
<para>The name of a command, package or manual page is expected on the command
line.</para>
<para>The following options are available:</para>
<variablelist>
<varlistentry>
<term><option>-c</option></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-p</option></term>
<listitem>
<para>Obtain documentation for the command specified from a specific
package.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-d</option></term>
<listitem>
<para>Obtain documentation for the package specified.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-s</option></term>
<listitem>
<para>The section from which to obtain the manual page specified.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="bugs">
<title>Bugs</title>
<para>Issues can be listed and reported at <ulink
url="http://www.defora.org/os/project/bug_list/340/Surfer"/>.</para>
</refsect1>
<refsect1 id="see_also">
<title>See also</title>
<para>
<citerefentry>
<refentrytitle>download</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>surfer</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>
</para>
</refsect1>
</refentry>
<!-- vim: set noet ts=1 sw=1 sts=1 tw=80: -->

View File

@ -1,5 +1,5 @@
targets=download.1,download.html,surfer.1,surfer.html
dist=Makefile,docbook.sh,download.xml,surfer.xml
targets=download.1,download.html,helper.1,helper.html,surfer.1,surfer.html
dist=Makefile,docbook.sh,download.xml,helper.xml,surfer.xml
[download.1]
type=script
@ -13,6 +13,18 @@ script=./docbook.sh
install=
depends=download.xml
[helper.1]
type=script
script=./docbook.sh
install=
depends=helper.xml
[helper.html]
type=script
script=./docbook.sh
install=
depends=helper.xml
[surfer.1]
type=script
script=./docbook.sh

View File

@ -72,6 +72,10 @@
<citerefentry>
<refentrytitle>download</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>helper</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry>
</para>
</refsect1>

View File

@ -84,6 +84,7 @@ static void _helper_on_file_open(gpointer data);
static void _helper_on_fullscreen(gpointer data);
#ifndef EMBEDDED
static void _helper_on_help_about(gpointer data);
static void _helper_on_help_contents(gpointer data);
#endif
#ifdef EMBEDDED
static void _helper_on_open(gpointer data);
@ -135,6 +136,8 @@ static const DesktopMenu _menu_view[] =
static const DesktopMenu _menu_help[] =
{
{ N_("_Contents"), G_CALLBACK(_helper_on_help_contents),
"help-contents", 0, GDK_KEY_F1 },
{ N_("_About"), G_CALLBACK(_helper_on_help_about),
# if GTK_CHECK_VERSION(2, 6, 0)
GTK_STOCK_ABOUT, 0, 0 },
@ -433,6 +436,13 @@ static gboolean _about_on_closex(gpointer data)
gtk_widget_hide(helper->ab_window);
return TRUE;
}
/* helper_on_help_contents */
static void _helper_on_help_contents(gpointer data)
{
desktop_help_contents(PACKAGE, "helper");
}
#endif