[evince] Make gnome-doc-utils optional
- From: Jan-Joost Spanjers <jspanjers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] Make gnome-doc-utils optional
- Date: Thu, 15 Apr 2010 12:54:58 +0000 (UTC)
commit bd26e60016e9e08c1784ee2d90695cc7eeb7daee
Author: Hib Eris <hib hiberis nl>
Date: Thu Apr 15 14:11:34 2010 +0200
Make gnome-doc-utils optional
Makefile.am | 7 +++++--
configure.ac | 30 +++++++++++++++++++++++++++++-
shell/ev-window.c | 13 +++++++------
3 files changed, 41 insertions(+), 9 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 4647ca4..a3ab218 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,8 +14,11 @@ SUBDIRS = \
libmisc \
properties \
shell \
- po \
- help
+ po
+
+if ENABLE_HELP
+SUBDIRS += help
+endif
if ENABLE_TESTS
SUBDIRS += test
diff --git a/configure.ac b/configure.ac
index 01eef2b..8f18357 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,7 +66,6 @@ AC_PROG_SED
AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
-GNOME_DOC_INIT
GNOME_MAINTAINER_MODE_DEFINES
GNOME_COMPILE_WARNINGS
GNOME_CXX_WARNINGS
@@ -715,6 +714,34 @@ AC_SUBST(EVINCE_MIME_TYPES)
AC_CHECK_FUNC(localtime_r, AC_DEFINE(HAVE_LOCALTIME_R, 1, [Defines if localtime_r is available on your system]))
# *****************
+# Help files
+# *****************
+
+GNOME_DOC_INIT([], gnome_doc_utils=yes, gnome_doc_utils=no)
+
+AC_ARG_ENABLE(help,
+ [AS_HELP_STRING([--disable-help], [Disable offline help files])],
+ [enable_help=$enableval],
+ [enable_help=yes])
+
+if test "x$enable_help" = "xyes" && test "x$os_win32" = "xyes" ; then
+ AC_MSG_WARN([Offline help is disabled (not implemented on Windows).])
+ enable_help=no
+fi
+
+if test "x$enable_help" = "xyes" && test "x$gnome_doc_utils" == "xno"; then
+ AC_MSG_ERROR(
+ [gnome-doc-utils not found; use --disable-help to disable help files]
+ )
+fi
+
+if test "x$enable_help" = "xyes"; then
+ AC_DEFINE([OFFLINE_HELP_ENABLED], [1], [Enable offline help])
+fi
+
+AM_CONDITIONAL(ENABLE_HELP, test "x$enable_help" = "xyes")
+
+# *****************
# API documentation
# *****************
@@ -825,6 +852,7 @@ Configure summary:
Keyring Support....: $with_keyring
DBUS Support.......: $enable_dbus
SM client support..: $with_smclient
+ Help files.........: $enable_help
Nautilus Plugin....: $enable_nautilus
Thumbnailer........: $enable_thumbnailer
Previewer..........: $enable_previewer
diff --git a/shell/ev-window.c b/shell/ev-window.c
index ec46976..b78c317 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -433,11 +433,6 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window)
ev_window_set_action_sensitive (ev_window, ZOOM_CONTROL_ACTION, has_pages);
ev_window_set_action_sensitive (ev_window, NAVIGATION_ACTION, FALSE);
- /* Help menu */
-#ifdef G_OS_WIN32
- ev_window_set_action_sensitive (ev_window, "HelpContents", FALSE);
-#endif
-
ev_window_update_actions (ev_window);
}
@@ -3938,13 +3933,19 @@ ev_window_cmd_view_autoscroll (GtkAction *action, EvWindow *ev_window)
ev_view_autoscroll_start (EV_VIEW (ev_window->priv->view));
}
+#if OFFLINE_HELP_ENABLED
+#define EV_HELP "ghelp:evince"
+#else
+#define EV_HELP "http://library.gnome.org/users/evince/stable/"
+#endif
+
static void
ev_window_cmd_help_contents (GtkAction *action, EvWindow *ev_window)
{
GError *error = NULL;
gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (ev_window)),
- "ghelp:evince",
+ EV_HELP,
gtk_get_current_event_time (),
&error);
if (error) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]