summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Nevins <jacobn@chiark.greenend.org.uk>2007-01-28 16:22:43 +0000
committerJacob Nevins <jacobn@chiark.greenend.org.uk>2007-01-28 16:22:43 +0000
commit15e205a0b12194a79eda05b283b88e352166d631 (patch)
treeb45b330ff2d95d8e0a7c278d7daf989ebc94f459
parent72d22e8a1a1b47635e1b8da49ae703bde01228f2 (diff)
downloadhalibut-15e205a0b12194a79eda05b283b88e352166d631.zip
halibut-15e205a0b12194a79eda05b283b88e352166d631.tar.gz
halibut-15e205a0b12194a79eda05b283b88e352166d631.tar.bz2
halibut-15e205a0b12194a79eda05b283b88e352166d631.tar.xz
Tweak the HTML Help output to enable Previous/Next navigation in the generated
CHM, and added the toolbar buttons for this. Also rationalised the other options a bit: - added Forward button (since we have Back); - removed Locate/Sync (since we have auto-sync enabled for the ToC); - removed Stop and Refresh (mostly a waste of space for help, but still available from the Options menu if users really want them); - enabled advanced facilities on the Search tab (search within results, etc). All this seems to have had no obvious ill effects (tested on Win98), although the resulting CHM file is slightly bigger (~3kbyte, <1%). [originally from svn r7176]
-rw-r--r--bk_html.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/bk_html.c b/bk_html.c
index 433dde1..dcfbcb7 100644
--- a/bk_html.c
+++ b/bk_html.c
@@ -1580,6 +1580,8 @@ void html_backend(paragraph *sourceform, keywordlist *keywords,
/*
* Output the MS HTML Help supporting files, if requested.
+ *
+ * A good unofficial reference for these is <http://chmspec.nongnu.org/>.
*/
if (conf.hhp_filename) {
htmlfile *f;
@@ -1599,6 +1601,8 @@ void html_backend(paragraph *sourceform, keywordlist *keywords,
fprintf(ho.fp,
"[OPTIONS]\n"
+ /* Binary TOC required for Next/Previous nav to work */
+ "Binary TOC=Yes\n"
"Compatibility=1.1 or later\n"
"Compiled file=%s\n"
"Default Window=main\n"
@@ -1633,7 +1637,17 @@ void html_backend(paragraph *sourceform, keywordlist *keywords,
NULL, keywords, &conf);
fprintf(ho.fp, "\",\"%s\",\"%s\",\"%s\",,,,,,"
- "0x42520,,0x3876,,,,,,,,0\n",
+ /* This first magic number is fsWinProperties, controlling
+ * Navigation Pane options and the like.
+ * Constants HHWIN_PROP_* in htmlhelp.h. */
+ "0x62520,,"
+ /* This second number is fsToolBarFlags, mainly controlling
+ * toolbar buttons. Constants HHWIN_BUTTON_*.
+ * NOTE: there are two pairs of bits for Next/Previous
+ * buttons: 7/8 (which do nothing useful), and 21/22
+ * (which work). (Neither of these are exposed in the HHW
+ * UI, but they work fine in HH.) We use the latter. */
+ "0x60304e,,,,,,,,0\n",
conf.hhc_filename ? conf.hhc_filename : "",
hhk_filename ? hhk_filename : "",
files.head->filename);