r10861 chris_y - /trunk/netsurf/amiga/menu.c

netsurf at semichrome.net netsurf at semichrome.net
Sun Oct 3 23:34:29 BST 2010


Author: chris_y
Date: Sun Oct  3 17:34:29 2010
New Revision: 10861

URL: http://source.netsurf-browser.org?rev=10861&view=rev
Log:
Simplify detection of valid filetypes for ASL

Modified:
    trunk/netsurf/amiga/menu.c

Modified: trunk/netsurf/amiga/menu.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/menu.c?rev=10861&r1=10860&r2=10861&view=diff
==============================================================================
--- trunk/netsurf/amiga/menu.c (original)
+++ trunk/netsurf/amiga/menu.c Sun Oct  3 17:34:29 2010
@@ -825,20 +825,7 @@
 
   	mt = fetch_mimetype(fname);
 
-	if(!strcmp(mt,"text/html")) ret = TRUE;
-	else if(!strcmp(mt,"text/plain")) ret = TRUE;
-	else if(!strcmp(mt,"image/jpeg")) ret = TRUE;
-	else if(!strcmp(mt,"image/gif")) ret = TRUE;
-	else if(!strcmp(mt,"image/png")) ret = TRUE;
-	else if(!strcmp(mt,"image/jng")) ret = TRUE;
-	else if(!strcmp(mt,"image/mng")) ret = TRUE;
-	else if(!strcmp(mt,"image/bmp")) ret = TRUE;
-	else if(!strcmp(mt,"image/ico")) ret = TRUE;
-	else if(!strcmp(mt,"image/x-riscos-sprite")) ret = TRUE;
-#ifdef WITH_NS_SVG
-	else if(!strcmp(mt,"image/svg")) ret = TRUE;
-#endif
-
+	if(content_lookup(mt) != CONTENT_OTHER) ret = TRUE;
 	free(mt);
 	return ret;
 }




More information about the netsurf-commits mailing list