[Nautilus-list] Need decision on help stuff
- From: Ali Abdin <aliabdin aucegypt edu>
- To: nautilus-list lists eazel com
- Subject: [Nautilus-list] Need decision on help stuff
- Date: Thu, 25 May 2000 10:53:21 +0300
Okay, per Darin's suggestion, I have decided to write this up to the
mailing. Yesterday, I was working on the Nautilus help component (not yet
checked in due to severa pain in my hands).
Anyway - I got things to a usable 'state'. Like you all know, 'man' and
'info' work because they use libvfs-translate.so. This is the contents of
the components/help/help-methods.conf file (installed in /etc/vfs):
help: libvfs-help.so
info: libvfs-translate.so -default-mime-type text/html -real-method pipe
-pattern "gnome-info2html2 %s"
man: libvfs-translate.so -default-mime-type text/html -real-method pipe
-pattern "gnome-man2html2 %s"
help will not work with the current libvfs-translate.so because there are
_TWO_ patterns ("gnome-db2html2 foo.sgml" and "gnome-db2html2
foo.sgml?<section_ID>"). This is important, because gnome-db2html2 only
generates the webpage of your current 'section' (the first pattern will
generate the index).
So libvfs-translate.so is out - oh, and also jrb was working on migrates
everything to libvfs-help.so (that includes info and man).
Here is a code segment from the help-method.c file:
case SGML_FILE:
if (help_uri->section)
retval = g_strdup_printf ("pipe:gnome-db2html2 %s?%s",
help_uri->file,
help_uri->section);
else
retval = g_strdup_printf ("pipe:gnome-db2html2 %s",
help_uri->file);
break;
case MAN_FILE:
retval = g_strdup_printf ("pipe:gnome-man2html2 %s",
help_uri->file);
break;
case INFO_FILE:
retval = g_strdup_printf ("pipe:gnome-info2html2 %s",
help_uri->file);
As you can see - eventually we get a pipe. The current problem with Nautilus
is the fact that we see the 'Sample Component' instead of the HTML file when
running the pipe:gnome-db2html. Nautilus does not detect the mime-type from
over the pipe and 'adjust' accordingly :(
Some solutions:
1) Add a -default-mime-type to the pipe: method (like libvfs-translate does).
I think this might be a good thing, because you do not necessarily know whats
coming over a pipe. So yo say '.tar.gz' file is coming over the pipe or
something, you should be able to handle that (just rip the code off
libvfs-translate and stick it into the pipe stuff). This is a gnome-vfs thing
by the way
2) Add mime-autodetection over a pipe (I'm not sure how this would be done
though)
3) mjs told "do it how man and info does it" - I pointed out above why this
doesn't work. It 'could' work if somebody hacked gnome-vfs'
libvfs-translate.so to accept two different 'help:' entries
4) Get gnome-db2html2 to act more like gnome-info2html2 (dump one big-ass HTML
file, and then to go to a specific section we would use tags (e.g.
help:/tmp/foo.sgml#Section2)
5) Somehow 'force' Nautilus to enter HTML mode when doing an 'info:' 'man:' or
'help:' (this sounds very hacky and I'm not sure its possible)
Of course, I can't come to any decisions on this. Besides, I'm not sure which
is the best approach anyway.
So could you Eazel folks discuss this among yourselves and tell me how you
guys wanna go from here?
I'll do my bugfixing 'commit' tonight, but then I have exams and won't be
around for a few days (forgive me).
Ali Abdin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]