Commit Graph

12 Commits

Author SHA1 Message Date
Michael Drake
1457a049bb Treeview: Add treeview_font_size to options.
Default is 11pt, and RISC OS overrides to 12pt.
2016-08-11 08:15:21 +01:00
Michael Drake
9aecf47408 Treeview: Rationalise initialisation and finalisation.
Previously the expected behaviour for front ends using the correct
API for hotlist, global history, cookie manager, and ssl cert
viewer was that the front end would initialise the treeview module
on startup and finalise it on application exit.

However, this meant that the front ends had to include the core
treeview header, which they didn't otherwise need.

Since the tree module provided access to the new treeview utilities
through the old tree API, and was used by front ends with no changes
for the new treeview API, the tree layer refcounted initialisations
of treeview-based widgets, and only called the underlying treeview
init/fini functions when needed.

This change moves that refcounting into the treeview module.  Now
the hotlist, global history, cookie manager, and ssl cert viewer
widgets call call treeview init/fini as part of their own
initialisation and finalisation.  This means that front ends
using the correct APIs for treeview-based widgets don't need to
know anything about the underlying treeview, and the tree module
compatibility layer has had its treeview refcounting removed.

Finally, the treeview_init function took a font size parameter.
Now it does not and lit gets font size from config.  We probably
want to add a new `treeview_font_size` option to nsoptions, and
have differnent defaults on different platforms. 12pt on RISC OS,
and 11pt elsewhere, most likely.
2016-08-10 18:57:36 +01:00
Michael Drake
a122b94efd URL escape: Simplify to avoid unnecessary allocation.
This removes the toskip parameter, which was only used by the RISC OS
front end.  The toskip param was used to skip 8 characters which did
not need to be escaped from the start of the URL.  The RISC OS front
end now orders the steps of its URL construction to avoid the need
for this.
2016-07-25 09:04:35 +01:00
Michael Drake
fa2e3b7784 URL unescape: return the new length to the caller.
The avoids situations were we threw away the length, only for
the caller to have to strlen the returned string.

Note, there seems to be a case of the amiga front end writing
beyond end of allocation.  Added a TODO for now.
2016-07-24 14:03:16 +01:00
Vincent Sanders
c313524998 reduce curl usage to fetcher, url unescaping and time parsing 2016-06-29 23:06:53 +01:00
Vincent Sanders
976eca9958 msplit public url database API out for frontends 2016-06-13 23:34:45 +01:00
Vincent Sanders
76a68d7dd0 Update content to split public and internal API 2016-06-06 09:01:38 +01:00
Vincent Sanders
7fc0a4c481 move desktop window header into public API 2016-05-30 17:32:57 +01:00
Vincent Sanders
c041393e66 move netsurf header into public API 2016-05-30 11:51:10 +01:00
Vincent Sanders
527756cca0 move fetch header into public API 2016-05-30 11:29:39 +01:00
Vincent Sanders
fe7eb85614 move misc header into public API 2016-05-30 11:23:32 +01:00
Vincent Sanders
d21447d096 move frontends into sub directory 2016-05-15 13:44:34 +01:00