From 7733ece4724d164f31e3be337ed09022f97d1d0e Mon Sep 17 00:00:00 2001 From: Chris Young Date: Tue, 24 Nov 2015 20:35:18 +0000 Subject: Remove the setting of mimetype in default tooltypes NetSurf is a lot more liberal now in accepting files, so the mimetype guessing routines are sufficient without forcing CSS files to be recognised as text/css. The ability to add a tooltype to troublesome files remains. --- amiga/dist/Install | 37 ++----------------------------------- amiga/file.c | 18 +++++++----------- 2 files changed, 9 insertions(+), 46 deletions(-) (limited to 'amiga') diff --git a/amiga/dist/Install b/amiga/dist/Install index a0a2bf4e1..439cc734e 100755 --- a/amiga/dist/Install +++ b/amiga/dist/Install @@ -1,18 +1,5 @@ ; Installation script for NetSurf -(procedure p_setmimetype #type #mimetype - (transcript "Setting MIME Type " #mimetype " for default " #type " icon") - - (set #fullpath (cat "ENVARC:Sys/def_" #type)) - - (tooltype - (prompt "Setting MIME type") - (help @tooltype-help) - (dest #fullpath) - (settooltype "MIMETYPE" #mimetype) - ) -) - (procedure p_append #filename #text (set #file-path (tackon "ENVARC:launch-handler/URL" #protocol)) (set #def-file-path (tackon "ENVARC:launch-handler/URL/defaults" #protocol)) @@ -298,26 +285,6 @@ (complete 80) -(working "Setting MIME types") -(p_setmimetype "css" "text/css") -(p_setmimetype "html" "text/html") -(p_setmimetype "ascii" "text/plain") -(p_setmimetype "jpeg" "image/jpeg") -(p_setmimetype "gif" "image/gif") -(p_setmimetype "png" "image/png") -(p_setmimetype "jng" "image/jng") -(p_setmimetype "mng" "image/mng") -(p_setmimetype "svg" "image/svg") -(p_setmimetype "bmp" "image/bmp") -(p_setmimetype "ico" "image/ico") -(p_setmimetype "sprite" "image/x-riscos-sprite") -(p_setmimetype "webp" "image/webp") -(p_setmimetype "lha" "application/x-lha") -(p_setmimetype "zip" "application/x-zip") -(p_setmimetype "js" "application/javascript") - -(complete 85) - (if (>= osver 53) (if (= (exists "Rexx:NetSurf") 0) ( @@ -364,7 +331,7 @@ ) ) -(complete 90) +(complete 85) (if (= #addlaunchhandler 1) ( @@ -391,7 +358,7 @@ ) ) -(complete 95) +(complete 90) (working "Running FixFonts") diff --git a/amiga/file.c b/amiga/file.c index ae9e3d059..8e81b9c28 100644 --- a/amiga/file.c +++ b/amiga/file.c @@ -117,17 +117,13 @@ static void ami_file_set_type(const char *path, lwc_string *mime_type) content_type type = content_factory_type_from_mime_type(mime_type); const char *default_type; - switch(type) - { - case CONTENT_HTML: - default_type = "html"; - break; - case CONTENT_CSS: - default_type = "css"; - break; - default: - default_type = NULL; - break; + switch(type) { + case CONTENT_HTML: + default_type = "html"; + break; + default: + default_type = NULL; + break; } if (default_type != NULL) { -- cgit v1.2.3