Surfer html viewer, want to improve it
Posted: Mon 31 Jul 2017, 14:33
Some pups, including Quirky, not sure about latest Xenialpup and Slacko, use 'surfer' for the internal html help viewer.
This is a very small web page browser, written in C and uses GTK and libgtkhtml.
It has a couple of dependencies from the same guy who created surfer, 'gnet' and 'libsystem', for pups that use surfer, these should already be in the devx.
All sources are here:
http://distro.ibiblio.org/quirky/quirky ... ml.tar.bz2
http://distro.ibiblio.org/quirky/quirky ... .8.tar.bz2
http://distro.ibiblio.org/quirky/quirky ... d1.tar.bz2
Compiling is simple Makefile, from memory, need to edit PREFIX, change from /usr/local to /usr
libgtkhtml is there also:
http://distro.ibiblio.org/quirky/quirky ... .1.tar.bz2
Surfer is a great little viewer for local html files, however, there is one big problem. libgtkhtml supports html4 and some css, no javascript.
If surfer is used to view a local help file, which has links to the internet, then surfer will attempt to open those links, and in many cases will crash.
What would be really great is to hack the C source of surfer somehow, so that two kinds of hyperlinks can be specified in a web page, local, suitable to be opened by surfer, and remote (the internet) and opened by 'defaultbrowser' (which will be SeaMonkey, Firefox, etc).
I have been staring at the source code, but can't see how to do it. So, thought that I would throw the problem out there, see if someone with gtk coding skills can think of how to do it. Or maybe not even gtk, just C skills.
There might not be any takers, but you never know...
Edit
Note, there is one little foible of surfer, it does not like "file://" prefix on local links. So open a file like this:
# surfer /usr/share/doc/home.htm
This is a very small web page browser, written in C and uses GTK and libgtkhtml.
It has a couple of dependencies from the same guy who created surfer, 'gnet' and 'libsystem', for pups that use surfer, these should already be in the devx.
All sources are here:
http://distro.ibiblio.org/quirky/quirky ... ml.tar.bz2
http://distro.ibiblio.org/quirky/quirky ... .8.tar.bz2
http://distro.ibiblio.org/quirky/quirky ... d1.tar.bz2
Compiling is simple Makefile, from memory, need to edit PREFIX, change from /usr/local to /usr
libgtkhtml is there also:
http://distro.ibiblio.org/quirky/quirky ... .1.tar.bz2
Surfer is a great little viewer for local html files, however, there is one big problem. libgtkhtml supports html4 and some css, no javascript.
If surfer is used to view a local help file, which has links to the internet, then surfer will attempt to open those links, and in many cases will crash.
What would be really great is to hack the C source of surfer somehow, so that two kinds of hyperlinks can be specified in a web page, local, suitable to be opened by surfer, and remote (the internet) and opened by 'defaultbrowser' (which will be SeaMonkey, Firefox, etc).
I have been staring at the source code, but can't see how to do it. So, thought that I would throw the problem out there, see if someone with gtk coding skills can think of how to do it. Or maybe not even gtk, just C skills.
There might not be any takers, but you never know...
Edit
Note, there is one little foible of surfer, it does not like "file://" prefix on local links. So open a file like this:
# surfer /usr/share/doc/home.htm