summaryrefslogtreecommitdiff
path: root/amiga/menu.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2011-03-06 13:58:02 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2011-03-06 13:58:02 +0000
commit5ac45472c7af8ccf686ea93791e491899889f087 (patch)
tree9d64a00ac2ceff5686f247ad163839a880f71b71 /amiga/menu.c
parentbfadf014825099ca4021a083fca7a6a83d737331 (diff)
downloadnetsurf-5ac45472c7af8ccf686ea93791e491899889f087.tar.gz
netsurf-5ac45472c7af8ccf686ea93791e491899889f087.tar.bz2
Fix broken CONTENT_PLUGIN API.
Add a default content handler for Amiga using the plugin interface, which passes unknown files (currently images only) through DataTypes. svn path=/trunk/netsurf/; revision=11924
Diffstat (limited to 'amiga/menu.c')
-rwxr-xr-xamiga/menu.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/amiga/menu.c b/amiga/menu.c
index d2c828da3..f70ace127 100755
--- a/amiga/menu.c
+++ b/amiga/menu.c
@@ -862,6 +862,7 @@ static const ULONG ami_asl_mime_hook(struct Hook *mh,struct FileRequester *fr,st
char fname[1024];
BOOL ret = FALSE;
char *mt = NULL;
+ content_type ct;
if(ap->ap_Info.fib_DirEntryType > 0) return(TRUE);
@@ -869,8 +870,14 @@ static const ULONG ami_asl_mime_hook(struct Hook *mh,struct FileRequester *fr,st
AddPart(fname,ap->ap_Info.fib_FileName,1024);
mt = fetch_mimetype(fname);
+ ct = content_lookup(mt);
+
+ if(ct != CONTENT_OTHER) ret = TRUE;
+
+#ifdef WITH_PLUGIN
+ if(ct == CONTENT_PLUGIN) ret = plugin_handleable(mt);
+#endif
- if(content_lookup(mt) != CONTENT_OTHER) ret = TRUE;
free(mt);
return ret;
}