diff options
author | Rob Kendrick <rjek@netsurf-browser.org> | 2007-05-29 23:53:35 +0000 |
---|---|---|
committer | Rob Kendrick <rjek@netsurf-browser.org> | 2007-05-29 23:53:35 +0000 |
commit | 7bc1a41ea0f2188de75445e0e23993b6c6b0006f (patch) | |
tree | 1a34af0e6fe5c1c5f3c9582655f9490ed2de2b7d /gtk/gtk_gui.c | |
parent | 01316168fc813f22ea15eda250f4d925c1fa9061 (diff) | |
download | netsurf-7bc1a41ea0f2188de75445e0e23993b6c6b0006f.tar.gz netsurf-7bc1a41ea0f2188de75445e0e23993b6c6b0006f.tar.bz2 |
Add UNIX-specific fetch_filetype() support. Uses /etc/mime.types by default, but can build minimal mappings if it doesn't exist. New code allows file:// directory listings to be generated, although these are not sorted unlike under RISC OS, as POSIX dirent() doesn't specify sorting.
svn path=/trunk/netsurf/; revision=3305
Diffstat (limited to 'gtk/gtk_gui.c')
-rw-r--r-- | gtk/gtk_gui.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c index fe35f1e2f..a2c98b9c5 100644 --- a/gtk/gtk_gui.c +++ b/gtk/gtk_gui.c @@ -35,6 +35,7 @@ #include "netsurf/gtk/options.h" #include "netsurf/gtk/gtk_throbber.h" #include "netsurf/gtk/gtk_history.h" +#include "netsurf/gtk/gtk_filetype.h" #include "netsurf/render/box.h" #include "netsurf/render/form.h" #include "netsurf/render/html.h" @@ -212,6 +213,9 @@ void gui_init(int argc, char** argv) LOG(("Using '%s' as Messages file", buf)); messages_load(buf); + find_resource(buf, "mime.types", "/etc/mime.types"); + gtk_fetch_filetype_init(buf); + /* set up stylesheet urls */ find_resource(buf, "default.css", "./gtk/res/default.css"); default_stylesheet_url = path_to_url(buf); @@ -321,6 +325,7 @@ void gui_quit(void) free(adblock_stylesheet_url); free(option_cookie_file); free(option_cookie_jar); + gtk_fetch_filetype_fin(); } |