ghelp URLs and what to do with them
- From: Lyndon Drake <lyndon stat auckland ac nz>
- To: gnome-devel-list <gnome-devel-list gnome org>
- Subject: ghelp URLs and what to do with them
- Date: Fri, 16 Apr 1999 19:48:00 +1200
Hi,
One of the few annoying things remaining in Gnome is the fact that ghelp URLs
are rewritten to file: URLs by the function in gnome-libs/libgnome/gnome-help.c.
The effect of this is that when you select in the URL capplet that you wish
ghelp stuff to be displayed using the Gnome help browser (logically enough),
help files still appear in Netscape.
This code in gnome-help.c is an example:
void
gnome_help_display (void *ignore, GnomeHelpMenuEntry *ref)
{
gchar *file, *url;
g_assert(ref != NULL);
g_assert(ref->path != NULL);
g_assert(ref->name != NULL);
file = gnome_help_file_path (ref->name, ref->path);
if (!file)
return;
url = alloca (strlen (file)+10);
strcpy (url,"file:");
strcat (url, file);
gnome_help_goto (ignore, url);
g_free (file);
}
IMO what this should do instead is construct a ghelp URL and pass that off
to gnome_help_goto (which does the right thing and calls gnome_url_show).
I was going to submit a patch which does just that, but the issue is a little
more complicated. It would appear from looking at the help browser that
ghelp URLs must be of the following form:
ghelp:gnome-terminal
The help browser works out a file URL from the name given after the :, and
loads and displays the file. However, there is no way (that I could discover,
anyway) to do something like:
ghelp:gnome-terminal/config.html
A URL like this is not needed for the help browser to work, because it has
already constructed an absolute file URL so that links inside the main
gnome-terminal page work. However, when a user clicks a help button in a
dialog box, the GnomeHelpMenuEntry passed to the appropriate help_display
function contains a path as well as a name (where gnome-terminal is the name
and config.html is the path).
I would like to propose that the ghelp URL definition be modified to a format
like the following:
ghelp:/name/path
I'm happy to fix gnome-libs up to work with this scheme, but I'm not so
confident mucking round with the help browser.
I hope that this hasn't come up and been decided before, but the whole help
displaying in Netscape bugs me a bit, so I would like to help fix things up.
Lyndon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]