diff options
-rw-r--r-- | configure.in | 11 | ||||
-rw-r--r-- | gtk/help_dlg.c | 9 |
2 files changed, 18 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 75f7d9a6d7..e00431334e 100644 --- a/configure.in +++ b/configure.in @@ -654,6 +654,17 @@ datafiledir=`( )` AC_DEFINE_UNQUOTED(DATAFILE_DIR,"$datafiledir", [Directory for data]) +# Create DOC_DIR #define for config.h +docdir=`( + test "x$prefix" = xNONE && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix=${prefix} + # Ugly hack, but I don't see how this problem can be solved + # properly that DOC_DIR had a value starting with + # "${prefix}/" instead of e.g. "/usr/local/" + eval eval echo "$docdir" +)` +AC_DEFINE_UNQUOTED(DOC_DIR, "$docdir", [Directory for docs]) + # GTK checks; we require GTK+ 2.4 or later. # We don't add $GLIB_LIBS to LIBS, because we don't want to force all # programs to be built with GTK+. diff --git a/gtk/help_dlg.c b/gtk/help_dlg.c index e703442724..4b8220e79a 100644 --- a/gtk/help_dlg.c +++ b/gtk/help_dlg.c @@ -107,8 +107,13 @@ void help_topic_html(const gchar *topic) { url = g_string_new(""); - /* try to open the HTML page from wireshark.org instead */ - g_string_append_printf(url, "http://www.wireshark.org/docs/wsug_html_chunked/%s", topic); + if (g_file_test(DOC_DIR "/wsug_html_chunked", G_FILE_TEST_IS_DIR)) { + /* try to open the HTML page from wireshark.org instead */ + g_string_append_printf(url, "file://" DOC_DIR "/wsug_html_chunked/%s", topic); + } else { + /* try to open the HTML page from wireshark.org instead */ + g_string_append_printf(url, "http://www.wireshark.org/docs/wsug_html_chunked/%s", topic); + } browser_open_url(url->str); |