From f824419a730758557f7fa5687ecb48bfcee56cbe Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Sat, 22 Sep 2001 03:14:53 +0000 Subject: Reviewed by John Fleck (Bug 60511) 2001-09-21 Philip Langdale * Reviewed by John Fleck (Bug 60511) * components/help/converters/gnome-info2html2/html.c * components/help/converters/gnome-info2html2/html.h * components/help/converters/gnome-info2html2/main.c: Added optional "galeon mode" invoked with -g command line param. This involves writing fully qualified info: hrefs instead of just the #nodename target, which appears to me to be a bug, but might have negative effects on nautilus. It also uses ? queries instead of # refs when forming hrefs. --- src/info2html/html.c | 7 ++++++- src/info2html/html.h | 2 ++ src/info2html/main.c | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/info2html/html.c b/src/info2html/html.c index 53378eeb..7044f95d 100644 --- a/src/info2html/html.c +++ b/src/info2html/html.c @@ -25,6 +25,8 @@ int inTable=0; char *BaseFilename=NULL; char *OverrideBaseFilename=NULL; +int galeon_mode=0; + /* prototypes */ char *form_info_tag_href( char *nodefile, char *nodename ); int make_Top_link( char *destdir, char *destfile ); @@ -53,7 +55,10 @@ char *form_info_tag_href( char *nodefile, char *nodename ) else filename = nodefile; - g_snprintf (tmp, sizeof (tmp), "HREF=\"#%s\"", escaped_nodename); + if (galeon_mode) + g_snprintf (tmp, sizeof (tmp), "HREF=\"info:%s?%s\"", filename, escaped_nodename); + else + g_snprintf (tmp, sizeof (tmp), "HREF=\"#%s\"", escaped_nodename); if (escaped_nodename) g_free(escaped_nodename); diff --git a/src/info2html/html.h b/src/info2html/html.h index 3237b474..0c73bad4 100644 --- a/src/info2html/html.h +++ b/src/info2html/html.h @@ -9,6 +9,8 @@ extern char *BaseFilename; extern char *OverrideBaseFilename; +extern int galeon_mode; + void dump_html_for_node( NODE *node ); void open_body_text_html( FILE *f ); diff --git a/src/info2html/main.c b/src/info2html/main.c index 5ccc70b8..3e3d6e67 100644 --- a/src/info2html/main.c +++ b/src/info2html/main.c @@ -29,6 +29,7 @@ static char *requested_nodename=NULL; static struct poptOption options[] = { {NULL, 'a', POPT_ARG_STRING, &requested_nodename}, {NULL, 'b', POPT_ARG_STRING, &OverrideBaseFilename}, + {NULL, 'g', POPT_ARG_NONE, &galeon_mode}, {NULL} }; -- cgit v1.2.1