Commit Graph

35 Commits

Author SHA1 Message Date
Vincent Sanders 0475693394 create table for fetcher operations and move all operations into it 2014-01-23 00:00:18 +00:00
Chris Young ade86e496e Replace AllocVec with AllocVecTags. Remove some instances of MEMF_CLEAR where it is not necessary. 2013-10-12 13:11:13 +01:00
Chris Young 486593df35 memory leak 2013-02-20 20:28:07 +00:00
Chris Young c545bb4b42 Identify JavaScript by extension as a fallback 2013-02-15 23:38:27 +00:00
Chris Young 5d7c1caffe Also read mimetype mappings from mimetypes.user
svn path=/trunk/netsurf/; revision=12876
2011-09-25 17:03:37 +00:00
Chris Young b6b1744b8e fix memory leak
svn path=/trunk/netsurf/; revision=12493
2011-06-19 11:25:59 +00:00
Chris Young afa2198a16 translate / to - when guessing mime types
svn path=/trunk/netsurf/; revision=12492
2011-06-19 11:24:22 +00:00
Chris Young 790bdf2e2a convert from mimetype to filetype rather than simple content type to filetype, where
available

svn path=/trunk/netsurf/; revision=12484
2011-06-15 21:53:49 +00:00
Chris Young 936baddaba Only show external app context menu item if an external app is actually defined
svn path=/trunk/netsurf/; revision=12470
2011-06-09 22:29:46 +00:00
Chris Young dee3127d79 Don't modify the DataType name within the structure.
Update mimetypes file a bit, add some more descriptive text.

svn path=/trunk/netsurf/; revision=12467
2011-06-06 22:27:10 +00:00
Chris Young 61138b0133 don't unref pointer
svn path=/trunk/netsurf/; revision=12452
2011-05-30 21:06:36 +00:00
Chris Young 0c9ca84e42 Remove ami_datatype_to_mimetype
svn path=/trunk/netsurf/; revision=12451
2011-05-30 21:03:57 +00:00
Chris Young e2ef8df4d7 Guess MIME type from DataType only if there isn't already a valid entry in the list
svn path=/trunk/netsurf/; revision=12450
2011-05-30 20:52:31 +00:00
Chris Young 9397f392c0 Convert the supplied MIME type to the DefIcons type *before* doing the comparison
svn path=/trunk/netsurf/; revision=12448
2011-05-30 16:16:48 +00:00
Chris Young 38bcb14d77 Migrate to new MIMEtyper
svn path=/trunk/netsurf/; revision=12375
2011-05-10 19:32:21 +00:00
Chris Young 2b19c144da Add function to convert MIME types to DefIcons types, and make ami_mime_compare use it
svn path=/trunk/netsurf/; revision=12371
2011-05-10 17:05:31 +00:00
Chris Young 5c95b32756 Fix crashing
svn path=/trunk/netsurf/; revision=12362
2011-05-09 22:39:30 +00:00
Chris Young 1f1fe78c17 New style MIME typing; maps MIME types to DataTypes and DefIcon format names.
Currently only able to resolve DataTypes to MIME Types.

TODO:
- DT MIME type guessing needs mostly removing (only use if no matches in mimetypes
file)
- Migrate the rest of filetype.c to the new format (can filetype using icon.library
and reverse lookup MIME type, for example)
- Use to distinguish between CONTENT_IMAGE types
- Simplify so DefIcon type defaults to lowercase DataType name

svn path=/trunk/netsurf/; revision=12360
2011-05-09 22:11:18 +00:00
Chris Young 208363fe2a Rename DataTypes related code/files/defines to avoid confusion and aid adding support
for other DataType classes.
Disable MNG/WebP by default as they aren't common and the required libs are quite
large; DataTypes can handle these formats for now.

svn path=/trunk/netsurf/; revision=12284
2011-05-06 22:42:37 +00:00
John Mark Bell e71691bae8 Merge branches/jmb/content-factory to trunk
svn path=/trunk/netsurf/; revision=12283
2011-05-06 20:40:09 +00:00
Chris Young 1cfc5b8970 More rigourous MIME type checking for CSS allows us to remove the icons from included
CSS files.

svn path=/trunk/netsurf/; revision=12049
2011-03-14 18:53:13 +00:00
Chris Young 0fc9da23f6 Check for RISC OS CSS filetype in case we have got redirected (ie. we are running from
the SVN tree and using resource: addressing)

svn path=/trunk/netsurf/; revision=12041
2011-03-14 00:33:13 +00:00
Chris Young 5ac45472c7 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
2011-03-06 13:58:02 +00:00
Chris Young 835d033e7b Amiga icon loader. Treeviews will now use the user's icons for content types.
svn path=/trunk/netsurf/; revision=10925
2010-10-30 14:23:38 +00:00
John Mark Bell 2077918805 Merge branches/vince/netsurf-file-fetcher to trunk
r=jmb

svn path=/trunk/netsurf/; revision=10750
2010-09-09 21:45:59 +00:00
Chris Young b6b86e8acc Show an icon under the pointer for drag save operations. Might need disabling under
4.0.

svn path=/trunk/netsurf/; revision=10670
2010-07-28 21:33:16 +00:00
Chris Young 004aee8281 Amiga: Add "cut" option; make cut/copy/paste menus context sensitive; allow dragging
selections within NetSurf window to text fields (does not work across windows).

todo: switching tabs will reset cut/copy/paste menus to initial state; cut option is
putting something on the clipboard which causes a crash when pasting it back

svn path=/trunk/netsurf/; revision=10660
2010-07-24 16:39:37 +00:00
Chris Young d5577b64fa Missing types
svn path=/trunk/netsurf/; revision=10626
2010-07-11 11:07:48 +00:00
Chris Young d508def2d6 HTML files with an icon but no MIMETYPE tooltype were being picked up by the
simplehtml datatype.  As I'm using dth_BaseName rather than dth_Name, they were being
tagged with the MIME type text/simplehtml.  Have made an exception for this case to
translate it to text/html, may in the future consider whether using dth_Name may be
better.

Minor adjustments to the local file requester to prevent .info files from being
displayed.

svn path=/trunk/netsurf/; revision=5711
2008-11-16 23:29:40 +00:00
Chris Young 17bc053fbf NetSurf will now check if it is already running (ie. if ARexx port NETSURF exists),
and quit and send an OPEN command to the one in memory if this is the case.

Setting files as projects of NetSurf is now possible, as is multi-select launching
from Workbench.  Multi-selects are not passed through using ARexx yet, only the first
file in the list will be opened if NetSurf is already running.

Plain text files which have no MIMETYPE tooltype are now correctly identified as
text/plain instead of text/ascii, allowing them to be opened locally.

svn path=/trunk/netsurf/; revision=5698
2008-11-16 14:42:40 +00:00
Chris Young d6874d05b1 Allow opening of local files from anywhere, not just the parent of the current dir.
svn path=/trunk/netsurf/; revision=5695
2008-11-15 15:28:17 +00:00
Chris Young 3b6476130d mime type overflow and tab switching fixes.
svn path=/trunk/netsurf/; revision=5660
2008-11-09 14:02:04 +00:00
Chris Young 66a759e2a1 Local file handling improvements (fetch_file is incomplete and not being used yet)
filetype.c has been changed to get the MIME type of a file from the MIMETYPE tooltype
of the icon or default icon for the file.  The install script will set the basic of
these, and icons for default.css and AdBlock.css have been added to ensure these
always return the correct MIME type.

If the MIMETYPE tooltype is not found, the code will use datatypes.library to identify
the file and make a guess as to what the MIME type is.

svn path=/trunk/netsurf/; revision=5651
2008-11-08 23:06:40 +00:00
Chris Young fbb2ae7f5f Fix problem with file uploads to amigans.net always returning error to the effect of:
files of type text/plain cannot be uploaded

svn path=/trunk/netsurf/; revision=5544
2008-10-11 22:01:26 +00:00
Chris Young 26203b2215 Initial Amiga port files, mostly empty stub functions.
svn path=/trunk/netsurf/; revision=4864
2008-08-02 14:31:32 +00:00