From 936baddabaac148f7c8831f38ec7f0d25f12078a Mon Sep 17 00:00:00 2001 From: Chris Young Date: Thu, 9 Jun 2011 22:29:46 +0000 Subject: Only show external app context menu item if an external app is actually defined svn path=/trunk/netsurf/; revision=12470 --- amiga/filetype.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'amiga/filetype.c') diff --git a/amiga/filetype.c b/amiga/filetype.c index bdc273365..e99a0fb33 100644 --- a/amiga/filetype.c +++ b/amiga/filetype.c @@ -564,6 +564,21 @@ struct Node *ami_mime_to_plugincmd(lwc_string *mimetype, } } +lwc_string *ami_mime_content_to_cmd(struct hlcache_handle *c) +{ + struct Node *node; + lwc_string *plugincmd; + lwc_string *mimetype; + + mimetype = content_get_mime_type(c); + + node = ami_mime_to_plugincmd(mimetype, + &plugincmd, NULL); + + if(node && (plugincmd != NULL)) return plugincmd; + else return NULL; +} + /** * Compare the MIME type of an hlcache_handle to a DefIcons type */ @@ -595,7 +610,7 @@ bool ami_mime_compare(struct hlcache_handle *c, const char *type) void ami_mime_dump(void) { - struct Node *node; + struct Node *node = NULL; struct ami_mime_entry *mimeentry; while(mimeentry = ami_mime_entry_locate(NULL, AMI_MIME_MIMETYPE, &node)) -- cgit v1.2.3