Commit Graph

245 Commits

Author SHA1 Message Date
Chris Young c8a8a7808e Tidy-up of redraw code
svn path=/trunk/netsurf/; revision=6345
2009-02-01 22:54:31 +00:00
Chris Young 350ab68077 gui_window_update_box and gui_window_redraw now only update the relevant areas.. I
think.  They are liable to destroy things outside of the render area as well
currently.

svn path=/trunk/netsurf/; revision=6342
2009-02-01 21:28:59 +00:00
Chris Young ad6f72667b Remove the caret by replacing it with the area under the caret, rather than the area
displayed somewhere else on the page.

svn path=/trunk/netsurf/; revision=6338
2009-02-01 18:36:17 +00:00
John Tytgat 3f0c50e5a0 - C strings have always an implicit NUL character at the end, no need to specify an extra one.
- riscos/configure/con_theme.c: removed spurious code line.

svn path=/trunk/netsurf/; revision=6331
2009-02-01 13:37:32 +00:00
Chris Young e8399d8a76 Oops, probably shouldn't double-convert text
svn path=/trunk/netsurf/; revision=6330
2009-02-01 13:30:47 +00:00
Chris Young 1c1347a215 Convert UTF-8 titles to local charset for display in tabs
Disable keyboard shortcuts for tabs as an underscore in the title was causing
keypresses to be ignored or tabs to be switched unexpectedly

svn path=/trunk/netsurf/; revision=6329
2009-02-01 13:26:21 +00:00
Chris Young fb0a2116a3 Change to use names instead of numbers for keypresses
Add missing keypresss

svn path=/trunk/netsurf/; revision=6328
2009-02-01 13:01:46 +00:00
Adrian Lees f46dd78718 Next batch of menu changes; clarify some key presses
svn path=/trunk/netsurf/; revision=6327
2009-02-01 02:19:01 +00:00
Chris Young 4cf6935761 Added context menu option to download the link target.
Added SAVEAS/K to OPEN ARexx command to download a URL instead of displaying it.

svn path=/trunk/netsurf/; revision=6326
2009-01-31 23:45:25 +00:00
John Tytgat 89cfc2f51b This change belonged to r6323.
svn path=/trunk/netsurf/; revision=6324
2009-01-31 16:28:29 +00:00
Chris Young 83d696ace7 This is the actual fix for the crashing, although this is temporary as the
implementation needs changing.

svn path=/trunk/netsurf/; revision=6283
2009-01-26 18:38:47 +00:00
Chris Young aa2df8c599 This appears to fix an odd crash
svn path=/trunk/netsurf/; revision=6262
2009-01-25 11:18:42 +00:00
Chris Young b5ee67b20e Handle key-presses manually for greater control, and to remove some keyboard
copy'n'paste annoyances.  Caps lock still fails to work though.

svn path=/trunk/netsurf/; revision=6261
2009-01-25 00:36:30 +00:00
Chris Young f4d1f89957 It's probably a good idea to free memory once we've finished with it.
svn path=/trunk/netsurf/; revision=6222
2009-01-24 12:24:15 +00:00
Chris Young 161dea3d8b Implement bold and italic font rendering for Unicode display and make it the default.
svn path=/trunk/netsurf/; revision=6155
2009-01-20 16:53:06 +00:00
Chris Young ddd59deaf2 position in string was off by one
svn path=/trunk/netsurf/; revision=6141
2009-01-18 12:15:48 +00:00
Chris Young 0ec4f9482c Clear render area properly when switching tabs
svn path=/trunk/netsurf/; revision=6116
2009-01-17 16:13:56 +00:00
Chris Young 1417b0c0b8 Complete Unicode text display implementation bar styles (bold, italic)
Need to find out why it is freezing on yahoo.ru

svn path=/trunk/netsurf/; revision=6115
2009-01-17 15:29:41 +00:00
Chris Young da4b0580b9 Most nsfont placement routines done for UTF-8 printing, missing the odd character off
of the end of lines though so needs some tweaking.

svn path=/trunk/netsurf/; revision=6109
2009-01-17 00:43:51 +00:00
Chris Young cd4f5ebd08 nsfont_width implemented for Unicode text
cache outline fonts for big speedup

still need to implement other text size functions
and also bold and italic fonts

svn path=/trunk/netsurf/; revision=6095
2009-01-16 20:05:21 +00:00
Chris Young ff6cfea10e Saving hotlist immedaitely after adding now saves it to the correct file
svn path=/trunk/netsurf/; revision=6093
2009-01-16 19:16:32 +00:00
Chris Young af7f83b9a5 Add copy and select all items
svn path=/trunk/netsurf/; revision=6092
2009-01-16 19:13:07 +00:00
Chris Young 15bd48a0da Spacing perfect, text now printing correctly on baseline.
Formatting is mostly only wrong when non-local charset characters are being printed,
due to the current text size calculations routines needing rewriting.

svn path=/trunk/netsurf/; revision=6073
2009-01-15 23:15:17 +00:00
Chris Young 82a801dbfa Much faster Unicode text display (still slower than local charset mode though)
Improved character spacing

Still some formatting issues:
Baseline is ignored
The text size calculation routines need to be re-written for the Unicode display

However sites are mostly readable now with this option enabled.

svn path=/trunk/netsurf/; revision=6072
2009-01-15 22:46:28 +00:00
Chris Young e7a06713af Some redraw optimisations
svn path=/trunk/netsurf/; revision=6071
2009-01-15 20:03:15 +00:00
Chris Young 60338f768f Allocate the file requester after reading the options which contain the values we need
to put in the allocation request

svn path=/trunk/netsurf/; revision=6068
2009-01-15 12:26:06 +00:00
Chris Young bb090ee7c3 Reinstate WINDOW_Qualifier - the AutoDoc is wrong, it returns a uint32 not a uint16.
This should stop shift and ctrl keys from appearing to get stuck down.

svn path=/trunk/netsurf/; revision=6035
2009-01-10 23:10:54 +00:00
Chris Young ccbf443125 Revert WINDOW_Qualifier change which was supposed to make shift and ctrl keyboard
reading more reliable, but for some reason wasn't returning the keyboard state as it
should.

svn path=/trunk/netsurf/; revision=6034
2009-01-10 22:57:23 +00:00
Chris Young a161809cdb fix warning
svn path=/trunk/netsurf/; revision=6033
2009-01-10 22:55:51 +00:00
Chris Young af1452dfb3 Add AmigaOS test builds link
svn path=/trunk/netsurf/; revision=6032
2009-01-10 22:18:48 +00:00
Chris Young 6085820add Modify 32-bit mouse pointers to look at the ones in ENV:Sys
These are expected to become some sort of standard :)
Will leave the Default theme pointing to the archive-included mouse pointer images
until this is official (Default theme should not require 3rd party images installed,
although it still needs AISS currently for some of the buttons)

svn path=/trunk/netsurf/; revision=6031
2009-01-10 22:17:57 +00:00
Chris Young 92e8c38d6c Remove prompts for screen dimensions
svn path=/trunk/netsurf/; revision=6029
2009-01-10 21:43:46 +00:00
Chris Young c9a7e4b2b9 Update options and ARexx commands
svn path=/trunk/netsurf/; revision=6028
2009-01-10 21:43:18 +00:00
Chris Young 2cb1775973 Add SAVE command, which saves the source of the current page to the named file.
Template: SAVE FILENAME/A

Will add additional options later.

svn path=/trunk/netsurf/; revision=6027
2009-01-10 21:33:34 +00:00
Chris Young 7098d2850d Fix screen clears
svn path=/trunk/netsurf/; revision=6026
2009-01-10 21:32:12 +00:00
Chris Young 4a706860a5 If screen mode ID is not set in the options, prompt for a screenmode on startup. This
replaces the old BestModeID() guess based on the window_screen_width,
window_screen_height and screen_depth options.

use_workbench has been replaced with use_pubscreen.  If set, NetSurf will attempt to
open on the named public screen.  If this fails it will fall back to Workbench (it
will not fall back to opening an own screen).
use_pubscreen:Workbench is equivalent to use_workbench:1

Allocate ASL file requesters specially for saves, to keep a consistent load/save
interface.  May also need a seperate one for the ARexx file requester.

svn path=/trunk/netsurf/; revision=6025
2009-01-10 21:31:21 +00:00
Chris Young 9a4175c4fa Use an ASL requester allocated for saves (which defaults to option_download_dir when
first used and remembers the save location thereafter) for the save requesters.

svn path=/trunk/netsurf/; revision=6024
2009-01-10 21:26:22 +00:00
Chris Young 1b58a411bc Replace use_workbench with a more general use_pubscreen option.
svn path=/trunk/netsurf/; revision=6023
2009-01-10 21:24:43 +00:00
Chris Young d6d8cb2fe4 Handle mailto: URLs through gui_launch_url()
svn path=/trunk/netsurf/; revision=6022
2009-01-10 21:22:46 +00:00
Chris Young 96c314750f More efficient layers clipping
svn path=/trunk/netsurf/; revision=5945
2008-12-29 01:18:53 +00:00
Chris Young e56aabc998 Complete set of Cairo plotters (from gtk_plotters.c).
All except the polygon plotter - as the graphics.library implementation has problems -
are disabled, but can be enabled by defining NS_AMIGA_CAIRO_ALL.

Using only the Cairo plotters is much slower than using only the graphics.library
plotters (especially clipping which is adding several seconds to rendering with Cairo)
and the default "mixed" Cairo state is the recommended configuration for now.

svn path=/trunk/netsurf/; revision=5944
2008-12-29 00:52:19 +00:00
Chris Young 605cf900b4 Some bitmap caching - not making much difference and using up a lot of gfx mem, may
need to make this a configurable option.

svn path=/trunk/netsurf/; revision=5943
2008-12-28 15:55:52 +00:00
Chris Young c059f24cfa Update for new SDK
svn path=/trunk/netsurf/; revision=5942
2008-12-28 13:49:26 +00:00
Chris Young 59f551171c Fix crash when launching NetSurf if it is already running.
svn path=/trunk/netsurf/; revision=5941
2008-12-28 12:35:55 +00:00
Chris Young 495fa6c648 Minor changes for Amiga Cairo build
svn path=/trunk/netsurf/; revision=5940
2008-12-28 12:24:18 +00:00
Chris Young fcf46a91b6 SVG support for Amiga version using libsvgtiny and libcairo
Cairo plotter for arcs

Cairo support is experimental and can be enabled with option NETSURF_AMIGA_USE_CAIRO
For some reason linking against shared objects breaks forms.

svn path=/trunk/netsurf/; revision=5939
2008-12-28 00:41:35 +00:00
Chris Young 2967b76f4a Unicode text display. Painfully slow and needs some work wrt text alignment, colours.
The nsfont_width etc functions also need adjustment.

svn path=/trunk/netsurf/; revision=5938
2008-12-27 23:25:42 +00:00
Chris Young 47e12b16f8 Missed one
svn path=/trunk/netsurf/; revision=5937
2008-12-27 18:39:16 +00:00
Chris Young 9b79c1c6a4 Handle opaqueness a bit
Appears that Composite() has the same problem as BitMapScale() in that trying to scale
to a negative co-ordinate destination doesn't work.  Still seems a bit faster after
adding the additional blit, although www.bbc.co.uk scrolls at a snail's pace since
adding alpha blits.


svn path=/trunk/netsurf/; revision=5936
2008-12-27 18:34:55 +00:00
Chris Young 78f912d5d3 Handle opaqueness a bit
svn path=/trunk/netsurf/; revision=5935
2008-12-27 18:32:20 +00:00
Chris Young 04d7ddde4f Update to new API
svn path=/trunk/netsurf/; revision=5933
2008-12-27 17:16:35 +00:00
Chris Young dbc6d8793f Reduce memory usage
svn path=/trunk/netsurf/; revision=5926
2008-12-26 19:04:57 +00:00
Chris Young b4e80b4d3a Respect alpha channel in bitmaps, and use Composite() instead of BitMapScale() under
OS4.1 (potentially a little quicker).

svn path=/trunk/netsurf/; revision=5925
2008-12-26 18:36:53 +00:00
Chris Young 5bff3e3287 Update for new SDK
svn path=/trunk/netsurf/; revision=5915
2008-12-20 10:54:59 +00:00
Chris Young d58fa7aee5 Actually check for the existance of the icon before attempting to copy it.
svn path=/trunk/netsurf/; revision=5913
2008-12-14 19:41:16 +00:00
Chris Young 3b46161143 Remove error page
svn path=/trunk/netsurf/; revision=5912
2008-12-14 19:32:39 +00:00
Chris Young 41b76fabe0 Minor mailto: improvements and info
svn path=/trunk/netsurf/; revision=5911
2008-12-14 19:20:30 +00:00
Chris Young d36799e07d First attempt at mailto: fetcher using openurl.library.
Doesn't quite work properly because it never calls the callback :)
Probably also gets into an infinite loop if "send mailto: URLs to email application"
is not ticked in OpenURL Prefs.

svn path=/trunk/netsurf/; revision=5910
2008-12-13 23:28:26 +00:00
Chris Young 689f2e4232 Save object
svn path=/trunk/netsurf/; revision=5909
2008-12-13 23:26:10 +00:00
Chris Young 0951de5c0e Clear display area when switching tabs
Remove always_open_tabs
Move pointer filenames to theme files


svn path=/trunk/netsurf/; revision=5908
2008-12-13 23:25:42 +00:00
Chris Young 95575276b5 More changes for search function.
Open local file requester now has a hook which filters out files with MIME types that
NetSurf does not recognise.

svn path=/trunk/netsurf/; revision=5907
2008-12-13 23:23:24 +00:00
Chris Young 1692db74e2 Remove Amiga-specific force_tabs
svn path=/trunk/netsurf/; revision=5906
2008-12-13 23:21:34 +00:00
Chris Young b682523066 Minor improvements to output.
svn path=/trunk/netsurf/; revision=5905
2008-12-13 23:20:49 +00:00
Chris Young 8a5ec4710e Copy theme's NetSurf.info if it exists and this is a new install.
svn path=/trunk/netsurf/; revision=5904
2008-12-13 23:19:33 +00:00
Chris Young 2b96f7fecd Add pointer image filenames to theme files
svn path=/trunk/netsurf/; revision=5903
2008-12-13 23:18:12 +00:00
Chris Young f543cbbf4c First attempt at Amiga text search function based on RISC OS code.
Needs some improvements:
- add case sensitive, show all options
- add search history
- use AmigaOS pattern matching

svn path=/trunk/netsurf/; revision=5902
2008-12-13 23:16:50 +00:00
Chris Young 5737ea10b2 Fix bitmap tile plotter so tiled bitmaps continue out of the inital visible area.
svn path=/trunk/netsurf/; revision=5899
2008-12-10 23:31:33 +00:00
Chris Young a121a3cd73 Fixed display of plain text files beyond the initial visible area.
svn path=/trunk/netsurf/; revision=5898
2008-12-10 19:30:00 +00:00
Chris Young 3e71585311 When a visitor window was present on NetSurf's public screen and NetSurf was quit, the
screen would fail to close.  Re-launching NetSurf would then fail to open a public
screen as a public screen with the same name was already open.  The window would end
up on the Workbench screen and then crash as the pointer to the screen being used was
NULL.

This fixes the problem by closing the ARexx port early (this stops any new sessions
from thinking NetSurf is still running) and looping until Intuition closes the screen.
Running NetSurf will check for a public screen of name NetSurf if opening a new screen
fails and use this if present.  It will also fall back to using the Workbench screen
if both opening a new screen and locking an existing NetSurf screen fails.

svn path=/trunk/netsurf/; revision=5886
2008-12-07 21:50:04 +00:00
Chris Young 7c695048ae Make NetSurf's screen a public screen with the name "NetSurf".
svn path=/trunk/netsurf/; revision=5885
2008-12-06 10:43:25 +00:00
Chris Young 24291b6160 Clarification on always_open_tabs and button_2_tab options and their interaction.
svn path=/trunk/netsurf/; revision=5884
2008-12-06 10:42:50 +00:00
Chris Young 7c65316f44 Fixed an issue with hotlist items outside the menu folder being added to the menu
in some circumstances.

svn path=/trunk/netsurf/; revision=5791
2008-11-25 22:43:23 +00:00
Chris Young ae0b5ff460 Two new ARexx commands:
GETTITLE - returns the current website title
VERSION VERSION/N REVISION/N RELEASE/S - returns the version of NetSurf or checks
it is newer than a supplied version/revision

svn path=/trunk/netsurf/; revision=5765
2008-11-24 08:06:11 +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 52eb07dc5b Sparse "About" requester - version number, compile date and URL only.
svn path=/trunk/netsurf/; revision=5697
2008-11-15 23:54:09 +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 9ae3c4f186 Added a note about local MIME types.
svn path=/trunk/netsurf/; revision=5655
2008-11-08 23:20:33 +00:00
Chris Young ed8a8a2f74 Installation scripts
Install is a standard Installer script
AutoInstall is an AmigaDOS script for AmiUpdate which calls the above Install script
in an unattended install mode.

svn path=/trunk/netsurf/; revision=5654
2008-11-08 23:11:18 +00:00
Chris Young 834eb20101 AmigaOS implementation of complete page save.
svn path=/trunk/netsurf/; revision=5653
2008-11-08 23:08:55 +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 d934e52dc6 Minor fixes, changing some defaults to safer values, screen_modeid should now work.
Added screen_depth to stop it complaining when trying to BestModeID() a 32-bit screen
on a system that doesn't have one.


svn path=/trunk/netsurf/; revision=5650
2008-11-03 19:21:40 +00:00
Chris Young cae0d4a43b Change memory allocations to MEMF_PRIVATE to enable paging on OS4.1.
svn path=/trunk/netsurf/; revision=5649
2008-11-02 00:21:49 +00:00
Chris Young 124899e5bc ARexx menu with items populated from arexx_dir.
svn path=/trunk/netsurf/; revision=5632
2008-10-26 12:25:26 +00:00
Chris Young 30b09368e7 Track the current/last used browser window (at the moment, just for ARexx).
Extended ARexx port.  First two are primarily for openurl.library:
* OPEN now takes a parameter NEW=NEWWINDOW/S to open the URL in a new window (default
is
to open in the current browser window)
* TOFRONT will bring NetSurf's screen to the front (this may be extended in the future
to bring the current browser window to the front - which might be better for when it
is running on the WB screen)

Next is to make it easy to support getvideo.rexx:
* GETURL returns the URL of the current browser window in RESULT

GetVideo.nsrx script will get the current URL and pass it to rexx:getvideo.rexx
Currently there is no way to call ARexx scripts directly from NetSurf, or any way to
specify whether to save, play or saveplay the video without editing the script.

[clipboard.c/clipboard.h were missing from previous commit]

svn path=/trunk/netsurf/; revision=5631
2008-10-25 23:22:34 +00:00
Chris Young 2f4beda48c Complete (but quite minimal at the moment) context menu implementation for AmigaOS:
Links, objects and upload file boxes have their own menu item or submenu.

Context menus can be enable/disabled and be made "sticky" with the following options:
context_menu
sticky_context_menu

Seperated clipboard related code out to clipboard.c to make it easier to maintain and
add the ability to copy URLs to the clipboard.  Copying images to the clipboard will
come later.


svn path=/trunk/netsurf/; revision=5629
2008-10-25 16:37:08 +00:00
Chris Young 5624bf590d Initial context menus. Five possible options (copy link to clipboard, download link,
show object, save object and select file for upload), only one implemented at the
moment.  Menu structure/strings need some thought and tidy-up (with object and URL
options in their own sub-menus?)

svn path=/trunk/netsurf/; revision=5612
2008-10-21 18:04:27 +00:00
Chris Young 1fffdafe21 Prepare for context menus
svn path=/trunk/netsurf/; revision=5607
2008-10-20 18:06:46 +00:00
Chris Young 307b88e934 Fixed bitmap tile plotter
svn path=/trunk/netsurf/; revision=5601
2008-10-19 13:44:01 +00:00
Chris Young c20560d250 Allow theming of default treeview folder and item images.
svn path=/trunk/netsurf/; revision=5600
2008-10-19 13:01:01 +00:00
Chris Young ddb6946431 Various fixes in relation to tabs.
svn path=/trunk/netsurf/; revision=5598
2008-10-19 11:33:05 +00:00
Chris Young 52c57acc48 Folders in the Hotlist menu hierarchy with no child nodes will now be disabled in the
menu.  Items named "--" will be converted to NM_BARLABEL.

svn path=/trunk/netsurf/; revision=5595
2008-10-18 15:13:18 +00:00
Chris Young cde05b7d9f Basic theme support.
NetSurf will use the theme pointed to by the Options file "theme:".  Default is
Resources/Themes/Default

This directory must contain a file called Theme which indicates which files should be
used for which images.  The number of frames in the Throbber must also be specified
here.  See Resources/Themes/Default/Theme for an example.

svn path=/trunk/netsurf/; revision=5592
2008-10-18 13:56:12 +00:00
Chris Young f74cd65518 Italian translation courtesy of Samir Hawamdeh.
svn path=/trunk/netsurf/; revision=5589
2008-10-17 17:34:27 +00:00
Chris Young a6b42a06ff Safer menu deletions; stop menus from appending to existing menu with each new window.
svn path=/trunk/netsurf/; revision=5578
2008-10-15 21:40:54 +00:00
Chris Young 1d8bbfae4c Implemented the ability to add hotlist entries to the Hotlist menu. Modified the
default Hotlist links so they show up in the menu.  Currently deleting items from the
menu is dangerous.

To add to the Hotlist menu, add a folder node called "Menu" to the root node of the
hotlist tree.

Items in this folder node up to a maximum (currently) of 40 items will be added to the
Hotlist menu, within the limits of the Intuition menu system.

Items in folders within the Menu folder node will be converted to subitems in the
menu.

Folder nodes with no entries and folder nodes at level 3 in the heirarchy will become
menu items with no action.  Items deeper will not be included in the menu at all.

eg.

Root
 |
 +- Menu
      |
      +- Netsurf
      |     |
      |     +- NetSurf Homepage
      |     |
      |     +- More NetSurf links
      |                |
      |                +- NetSurf bugtracker
      |
      +- Google

Will look something like the following within the menu:

|NetSurf »| - |NetSurf Homepage  |
|Google   |   |More NetSurf links|



svn path=/trunk/netsurf/; revision=5577
2008-10-14 22:43:02 +00:00
Chris Young 227993f481 Fix basic rearrangement of tree nodes
svn path=/trunk/netsurf/; revision=5567
2008-10-13 22:34:54 +00:00
Chris Young 4e5a7ec3f1 Default official throbber imagery.
throbber_frames:9

svn path=/trunk/netsurf/; revision=5565
2008-10-13 18:02:39 +00:00
Chris Young 5bf4caf6ba AmiUpdate support.
svn path=/trunk/netsurf/; revision=5564
2008-10-13 18:01:25 +00:00