[gnome-color-manager] Add a proper help file, although it needs some grammar fixes
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] Add a proper help file, although it needs some grammar fixes
- Date: Sun, 1 Nov 2009 23:29:26 +0000 (UTC)
commit d75523d241f721c426adc4b45ebcac47619201b8
Author: Richard Hughes <richard hughsie com>
Date: Sun Nov 1 23:28:30 2009 +0000
Add a proper help file, although it needs some grammar fixes
Makefile.am | 1 +
README | 2 +-
configure.ac | 15 +++++++
contrib/gnome-color-manager.spec.in | 2 +-
data/gcm-prefs.ui | 1 -
help/C/.gitignore | 3 +
help/C/legal.xml | 76 +++++++++++++++++++++++++++++++++++
help/Makefile.am | 15 +++++++
help/gnome-color-manager-C.omf | 22 ++++++++++
src/gcm-prefs.c | 2 +-
src/gcm-utils.c | 33 +++++++++++++++
src/gcm-utils.h | 1 +
12 files changed, 169 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index b5fd108..00f0a4d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
SUBDIRS = \
po \
+ help \
data \
src
diff --git a/README b/README
index 3be629d..df5a19a 100644
--- a/README
+++ b/README
@@ -4,5 +4,5 @@
gnome-color-manager is a session program that makes it easy to manage, install
and generate color profiles in the GNOME desktop.
-For more information, please see http://www.packagekit.org
+For more information, please see http://live.gnome.org/GnomeColorManager
diff --git a/configure.ac b/configure.ac
index fd31df2..38e8a93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -132,11 +132,26 @@ AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2
dnl ---------------------------------------------------------------------------
+dnl - Where should we put documentation ?
+dnl ---------------------------------------------------------------------------
+AC_ARG_WITH(doc-dir,
+ AS_HELP_STRING([--with-doc-dir=<dir>],
+ [directory to install documentation]))
+
+if ! test -z "$with_doc_dir"; then
+ DOCDIR="$with_doc_dir/gnome-color-manager-$VERSION"
+else
+ DOCDIR="$DATADIR/doc/gnome-color-manager-$VERSION"
+fi
+AC_SUBST(DOCDIR)
+
+dnl ---------------------------------------------------------------------------
dnl - Makefiles, etc.
dnl ---------------------------------------------------------------------------
AC_OUTPUT([
Makefile
src/Makefile
+help/Makefile
data/Makefile
data/profiles/Makefile
data/icons/Makefile
diff --git a/contrib/gnome-color-manager.spec.in b/contrib/gnome-color-manager.spec.in
index 9f195c7..edfe7ff 100644
--- a/contrib/gnome-color-manager.spec.in
+++ b/contrib/gnome-color-manager.spec.in
@@ -106,7 +106,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_datadir}/gnome-color-manager/profiles/*.ic?
%{_datadir}/gnome-color-manager/gcm-*.ui
#%{_datadir}/man/man1/*.1.gz
-#%{_datadir}/gnome/help/gnome-color-manager
+%{_datadir}/gnome/help/gnome-color-manager
#%{_datadir}/omf/gnome-color-manager
%{_datadir}/icons/hicolor/*/*/*.png
%{_datadir}/icons/hicolor/scalable/*/*.svg*
diff --git a/data/gcm-prefs.ui b/data/gcm-prefs.ui
index 234f1c8..b0c1dc7 100644
--- a/data/gcm-prefs.ui
+++ b/data/gcm-prefs.ui
@@ -342,7 +342,6 @@
<object class="GtkButton" id="button_help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
diff --git a/help/C/.gitignore b/help/C/.gitignore
new file mode 100644
index 0000000..c32b264
--- /dev/null
+++ b/help/C/.gitignore
@@ -0,0 +1,3 @@
+*.mo
+gnome-color-manager.xml
+
diff --git a/help/C/legal.xml b/help/C/legal.xml
new file mode 100644
index 0000000..ac97e1d
--- /dev/null
+++ b/help/C/legal.xml
@@ -0,0 +1,76 @@
+ <legalnotice id="legalnotice">
+ <para>
+ Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation
+ License (GFDL), Version 1.1 or any later version published
+ by the Free Software Foundation with no Invariant Sections,
+ no Front-Cover Texts, and no Back-Cover Texts. You can find
+ a copy of the GFDL at this <ulink type="help"
+ url="ghelp:fdl">link</ulink> or in the file COPYING-DOCS
+ distributed with this manual.
+ </para>
+ <para> This manual is part of a collection of GNOME manuals
+ distributed under the GFDL. If you want to distribute this
+ manual separately from the collection, you can do so by
+ adding a copy of the license to the manual, as described in
+ section 6 of the license.
+ </para>
+
+ <para>
+ Many of the names used by companies to distinguish their
+ products and services are claimed as trademarks. Where those
+ names appear in any GNOME documentation, and the members of
+ the GNOME Documentation Project are made aware of those
+ trademarks, then the names are in capital letters or initial
+ capital letters.
+ </para>
+
+ <para>
+ DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED
+ UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE
+ WITH THE FURTHER UNDERSTANDING THAT:
+
+ <orderedlist>
+ <listitem>
+ <para>DOCUMENT IS PROVIDED ON AN "AS IS" BASIS,
+ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
+ IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
+ THAT THE DOCUMENT OR MODIFIED VERSION OF THE
+ DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR
+ A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE
+ RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE
+ OF THE DOCUMENT OR MODIFIED VERSION OF THE
+ DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR
+ MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT,
+ YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY
+ CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
+ SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
+ OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
+ LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED
+ VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER
+ EXCEPT UNDER THIS DISCLAIMER; AND
+ </para>
+ </listitem>
+ <listitem>
+ <para>UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL
+ THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE),
+ CONTRACT, OR OTHERWISE, SHALL THE AUTHOR,
+ INITIAL WRITER, ANY CONTRIBUTOR, OR ANY
+ DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION
+ OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH
+ PARTIES, BE LIABLE TO ANY PERSON FOR ANY
+ DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
+ CONSEQUENTIAL DAMAGES OF ANY CHARACTER
+ INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS
+ OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR
+ MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR
+ LOSSES ARISING OUT OF OR RELATING TO USE OF THE
+ DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT,
+ EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF
+ THE POSSIBILITY OF SUCH DAMAGES.
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ </legalnotice>
+
diff --git a/help/Makefile.am b/help/Makefile.am
new file mode 100644
index 0000000..d74867c
--- /dev/null
+++ b/help/Makefile.am
@@ -0,0 +1,15 @@
+include $(top_srcdir)/gnome-doc-utils.make
+dist-hook: doc-dist-hook
+
+DOC_MODULE = gnome-color-manager
+DOC_ENTITIES = legal.xml
+DOC_INCLUDES =
+DOC_FIGURES = \
+ figures/gcm-adjust.png \
+ figures/gcm-basic.png \
+ figures/gcm-calibrate-default.png \
+ figures/gcm-calibrate-drawing.png \
+ figures/gcm-import.png
+
+DOC_LINGUAS =
+
diff --git a/help/gnome-color-manager-C.omf b/help/gnome-color-manager-C.omf
new file mode 100644
index 0000000..5b50700
--- /dev/null
+++ b/help/gnome-color-manager-C.omf
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<omf>
+ <resource>
+ <creator>richard hughsie com (Richard Hughes)</creator>
+ <maintainer>(Richard Hughes)</maintainer>
+ <maintainer>richard hughsie com (Richard Hughes)</maintainer>
+ <title>GNOME Color Manager Manual</title>
+ <date>2009-11-01</date>
+ <version identifier="2.0" date="2009-11-01"/>
+ <subject category="GNOME|System"/>
+ <description>
+ GNOME Color Manager is a session program that makes it easy to manage,
+ install and generate color profiles in the GNOME desktop.
+ </description>
+ <type>user's guide</type>
+ <format mime="text/xml" dtd="-//OASIS//DTD DocBook XML V4.3//EN"/>
+ <identifier url="file:///home/hughsie/.root/share/gnome/help/gnome-color-manager/C/gnome-color-manager.xml"/>
+ <language code="C"/>
+ <relation seriesid="05f6f536-3d56-060f-7fe9-a13f3eed742c40"/>
+ <rights type="GNU FDL" license.version="1.1" holder="Richard Hughes"/>
+ </resource>
+</omf>
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index f1bd9d7..4432670 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -72,7 +72,7 @@ gcm_prefs_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
static void
gcm_prefs_help_cb (GtkWidget *widget, gpointer data)
{
- egg_warning ("help for prefs");
+ gcm_gnome_help ("preferences");
}
/**
diff --git a/src/gcm-utils.c b/src/gcm-utils.c
index 4b84d44..214f164 100644
--- a/src/gcm-utils.c
+++ b/src/gcm-utils.c
@@ -395,3 +395,36 @@ gcm_utils_ptr_array_to_strv (GPtrArray *array)
return value;
}
+/**
+ * gpk_gnome_help:
+ * @link_id: Subsection of help file, or %NULL.
+ **/
+gboolean
+gcm_gnome_help (const gchar *link_id)
+{
+ GError *error = NULL;
+ gchar *uri;
+ gboolean ret = TRUE;
+
+ if (link_id)
+ uri = g_strconcat ("ghelp:gnome-color-manager?", link_id, NULL);
+ else
+ uri = g_strdup ("ghelp:gnome-color-manager");
+ egg_debug ("opening uri %s", uri);
+
+ gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, &error);
+
+ if (error != NULL) {
+ GtkWidget *d;
+ d = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", error->message);
+ gtk_dialog_run (GTK_DIALOG(d));
+ gtk_widget_destroy (d);
+ g_error_free (error);
+ ret = FALSE;
+ }
+
+ g_free (uri);
+ return ret;
+}
+
diff --git a/src/gcm-utils.h b/src/gcm-utils.h
index bc81bb2..42fa152 100644
--- a/src/gcm-utils.h
+++ b/src/gcm-utils.h
@@ -50,6 +50,7 @@ gboolean gcm_utils_mkdir_and_copy (const gchar *source,
GError **error);
gchar *gcm_utils_get_profile_destination (const gchar *filename);
gchar **gcm_utils_ptr_array_to_strv (GPtrArray *array);
+gboolean gcm_gnome_help (const gchar *link_id);
#endif /* __GCM_UTILS_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]