After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 136242 - Documentation/usage mismatch
Documentation/usage mismatch
Status: RESOLVED FIXED
Product: libgnome
Classification: Deprecated
Component: general
2.4.x
Other Linux
: Normal trivial
: ---
Assigned To: libgnome maintainer
libgnome maintainer
Depends on:
Blocks:
 
 
Reported: 2004-03-05 02:08 UTC by Toshio Kuratomi
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4


Attachments
Change the search order of extensions on the help file (422 bytes, patch)
2004-03-27 13:50 UTC, Toshio Kuratomi
none Details | Review

Description Toshio Kuratomi 2004-03-05 02:08:10 UTC
The documentation for libgnome gnome_help_display tells me the first
argument should be a filename.  Running under strace I found that the
library is trying to use the first argument as a directory.  Luckily, the
library is smart enough to strip the filename of its extension and try that
as well.  Unfortunately, it tries a lot of gnome/help/conglomerate.xml/C/
paths before it does that.

It would be nice if the documentation and the behaviour were made to match
and the documented method was the one tried first.
Comment 1 Kjartan Maraas 2004-03-27 06:48:40 UTC
If you look at the source, the function in question does match the
documentation, but it just calls another function that has two more args before
the filename given in the first function. Can we close this or do you still
think there's a problem here?
Comment 2 Toshio Kuratomi 2004-03-27 13:50:16 UTC
Created attachment 25999 [details] [review]
Change the search order of extensions on the help file

How about this patch to libgnome/gnome-help.c locate_help_file()?

It just changes the search order of extensions so we search for the specified
filename without an additional extension first.  Since the documentation
specifies that we're supposed to specify a filename, properly written code
should already have the proper extension tacked on.

It's a really small nit-pick; I just like to see code that optimizes for the
case where the programmer follows the documented interface.

(Note: Untested but looks safe)
Comment 3 Anders Carlsson 2004-05-02 10:12:12 UTC
I've committed this patch to HEAD, thanks.