diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2010-07-28 21:33:16 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2010-07-28 21:33:16 +0000 |
commit | b6b86e8acc25edecd33e24e2944adfe1badf0263 (patch) | |
tree | 4bb9776aa509944bcd8f68279bbf0635832c3f39 /amiga/filetype.c | |
parent | 229393e22e6484acf98422387ede9bc7f5112695 (diff) | |
download | netsurf-b6b86e8acc25edecd33e24e2944adfe1badf0263.tar.gz netsurf-b6b86e8acc25edecd33e24e2944adfe1badf0263.tar.bz2 |
Show an icon under the pointer for drag save operations. Might need disabling under
4.0.
svn path=/trunk/netsurf/; revision=10670
Diffstat (limited to 'amiga/filetype.c')
-rw-r--r-- | amiga/filetype.c | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/amiga/filetype.c b/amiga/filetype.c index 89500edc7..cb5411923 100644 --- a/amiga/filetype.c +++ b/amiga/filetype.c @@ -19,6 +19,7 @@ #include <stdlib.h> #include <string.h> #include "content/fetch.h" +#include "content/content_type.h" #include "utils/log.h" #include "utils/utils.h" #include <proto/icon.h> @@ -130,3 +131,73 @@ char *fetch_mimetype(const char *ro_path) { return strdup(fetch_filetype(ro_path)); } + +const char *ami_content_type_to_file_type(content_type type) +{ + switch(type) + { + case CONTENT_HTML: + return "html"; + break; + + case CONTENT_TEXTPLAIN: + return "ascii"; + break; + + case CONTENT_CSS: + return "css"; + break; + +#ifdef WITH_JPEG + case CONTENT_JPEG: + return "jpeg"; + break; +#endif +#ifdef WITH_GIF + case CONTENT_GIF: + return "gif"; + break; +#endif +#ifdef WITH_BMP + case CONTENT_BMP: + return "bmp"; + break; + + case CONTENT_ICO: + return "ico"; + break; +#endif +#if defined(WITH_MNG) || defined(WITH_PNG) + case CONTENT_PNG: + return "png"; + break; +#endif +#ifdef WITH_MNG + case CONTENT_JNG: + return "jng"; + break; + + case CONTENT_MNG: + return "mng"; + break; +#endif +#if defined(WITH_SPRITE) || defined(WITH_NSSPRITE) + case CONTENT_SPRITE: + return "rosprite"; + break; +#endif + + case CONTENT_DIRECTORY: + return "drawer"; + break; + +#if defined(WITH_NS_SVG) || defined(WITH_RSVG) + case CONTENT_SVG: + return "svg"; + break; +#endif + default: + return "project"; + break; + } +} |