From 7bc1a41ea0f2188de75445e0e23993b6c6b0006f Mon Sep 17 00:00:00 2001 From: Rob Kendrick Date: Tue, 29 May 2007 23:53:35 +0000 Subject: 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 --- gtk/gtk_gui.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gtk/gtk_gui.c') 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(); } -- cgit v1.2.3