path: root/amiga
diff options
authorChris Young <>2011-09-25 17:03:37 +0000
committerChris Young <>2011-09-25 17:03:37 +0000
commit5d7c1caffebc5ed44c08774f3d4ab5a5426d4ce9 (patch)
tree1f4019a67997864066a8c304e8507fe6bcf526bb /amiga
parent4573560c6179d922337054451b15369f51c25359 (diff)
Also read mimetype mappings from mimetypes.user
svn path=/trunk/netsurf/; revision=12876
Diffstat (limited to 'amiga')
5 files changed, 11 insertions, 5 deletions
diff --git a/amiga/dist/ b/amiga/dist/
index 0abbfb141..1d63bae67 100755
--- a/amiga/dist/
+++ b/amiga/dist/
@@ -203,7 +203,7 @@ Will look something like the following within the menu:
@node mimetypes "Local MIME Types"
NetSurf determines the MIME types of local files primarily by checking the icon of the file. If the icon is not found it will check the default icon for the file type.
-It looks for a tooltype MIMETYPE and, if found, will use the contents as the filetype of the file. If not found it makes a guess at the MIME type using datatypes.library, however this will not be very accurate.
+It looks for a tooltype MIMETYPE and, if found, will use the contents as the filetype of the file. If not found it will use datatypes.library and do a reverse lookup based on the contents of Resources/mimetypes[.user]
The Installer script will set the MIMETYPE tooltype on basic relevant default filetype icons. If you get problems:
* If the file has a real icon, add MIMETYPE=<MIME type of file> to the tooltypes.
diff --git a/amiga/filetype.c b/amiga/filetype.c
index 5cb661074..7b6805da7 100644
--- a/amiga/filetype.c
+++ b/amiga/filetype.c
@@ -34,7 +34,7 @@
* filetype -- determine the MIME type of a local file
-struct MinList *ami_mime_list;
+struct MinList *ami_mime_list = NULL;
struct ami_mime_entry
@@ -186,7 +186,8 @@ nserror ami_mime_init(const char *mimefile)
struct nsObject *node;
struct ami_mime_entry *mimeentry;
- ami_mime_list = NewObjList();
+ if(ami_mime_list == NULL)
+ ami_mime_list = NewObjList();
rargs = AllocDosObjectTags(DOS_RDARGS,TAG_DONE);
diff --git a/amiga/gui.c b/amiga/gui.c
index b56b2eb06..c5725cd2f 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -760,6 +760,7 @@ int main(int argc, char** argv)
die("Cannot open Messages file");
+ ami_mime_init("PROGDIR:Resources/mimetypes.user");
diff --git a/amiga/pkg/makepackage b/amiga/pkg/makepackage
index 4065f99dc..0c3350219 100755
--- a/amiga/pkg/makepackage
+++ b/amiga/pkg/makepackage
@@ -10,6 +10,7 @@ delete ram:netsurf/resources/#?hotlist#?
delete ram:netsurf/resources/cookies
delete ram:netsurf/resources/urls
delete ram:netsurf/resources/options
+delete ram:netsurf/resources/#?.user
copy resources/Pointers/~(.svn) ram:NetSurf/Resources/Pointers
copy (COPYING|ChangeLog) ram:NetSurf/
copy NetSurf ram:NetSurf/NetSurf
diff --git a/amiga/resources/mimetypes b/amiga/resources/mimetypes
index 966881a44..4068b571f 100644
--- a/amiga/resources/mimetypes
+++ b/amiga/resources/mimetypes
@@ -15,7 +15,10 @@
; assigned a MIME type constructed from the DataTypes superclass
; and a lowercase version of the full format name (eg. ILBM becomes
; image/ilbm)
+; Please DO NOT edit this file, any changes will be overwritten on
+; reinstall/upgrade. Instead create a file called mimetypes.user
+; with any additions, and place it in the same directory as mimetypes.
; Image types
@@ -48,7 +51,7 @@ application/ico DT=ICO TYPE=ico
application/x-ico DT=ICO TYPE=ico
; .info
-image/x-amiga-icon DT=INFO
+image/x-amiga-icon DT="AmigaOS Icon"
image/jng DT=JNG TYPE=jng