Commit Graph

98 Commits

Author SHA1 Message Date
Michael Drake
ec4b9a5dd0 Hotlist (bookmarks): Include the URL field in search. 2017-09-18 23:18:44 +01:00
Michael Drake
fb5344df09 Hotlist (bookmarks): Enable search feature. 2017-09-18 23:18:44 +01:00
Vincent Sanders
75018632a9 Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done

@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 18:45:27 +01:00
Michael Drake
06baaa9f7c Core hotlist: A NULL save_path makes the hotlist read-only. 2017-04-28 12:02:48 +01:00
Michael Drake
31d98a1d2e Core hotlist: Ensure any hotlist save callback is removed on hotlist_fini. 2017-04-25 15:14:56 +01:00
Michael Drake
479c3fd0b5 Hotlist: Save hotlist modifications.
When URLs are added, or address entries are edited or deleted,
a hotlist save is scheduled to happen after 10 seconds, if there
isn't already a hotlist save scheduled.
2017-04-25 13:09:44 +01:00
Michael Drake
c47b9f465c Core hotlist API: Take save path at init, rather than fini. 2017-04-25 11:52:47 +01:00
Michael Drake
b6be869f19 Hotlist: Allow hotlist initilialisation without hotlist corewindow.
Now, hotlist_init can be called without a corewindow.  This allows the
hotlist backend to be up and running, before any hostlist manager is
opened.  Calling hotlist_manager_init attaches the hotlist to a corewindow.
2016-12-29 14:44:48 +00: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
Vincent Sanders
597d167b9d fix hotlist keypress consumption return 2016-08-06 16:59:43 +01:00
Vincent Sanders
976eca9958 msplit public url database API out for frontends 2016-06-13 23:34:45 +01:00
Vincent Sanders
7fc0a4c481 move desktop window header into public API 2016-05-30 17:32:57 +01:00
Vincent Sanders
fe7eb85614 move misc header into public API 2016-05-30 11:23:32 +01:00
Vincent Sanders
6a36d4ec2b remove all core usage of warn_user API 2016-04-26 12:50:16 +01:00
Vincent Sanders
c105738fa3 Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.

The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.

A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
2015-05-28 16:08:46 +01:00
Michael Drake
cf954f9494 The AmigaOS rename() isn't POSIX compiant, so call remove() first.
There will be a race condition on AmigaOS if a hostlist file gets created
between the remove() and rename() calls.
2015-02-03 10:15:37 +00:00
Michael Drake
5d51547ea7 Remove redundant remove() call. 2015-01-23 14:11:43 +00:00
Michael Drake
19f12b01a4 Fix failure to save hotlist when there was no previous file. 2015-01-23 12:14:37 +00:00
Michael Drake
78b2da934f Mark URL field for copying to clipboard. 2015-01-03 00:21:31 +00:00
Michael Drake
c45be2ecf4 Handle failure to remove or rename. 2015-01-02 15:34:09 +00:00
Michael Drake
6ffab5885d Don't free temp_path just before its used. 2015-01-02 15:34:08 +00:00
Michael Drake
27ea134be4 RISC OS filenames can't contian '.' 2015-01-02 13:37:39 +00:00
Michael Drake
e31ae2c5a1 Make saving hotlist safer.
If saving hotlist to "<path>", we now save to "<path>.bk", then remove
the file at "<path>", and replace it with the one at "<path>.bk".

This should prevent hotlist corruption when someone pulls the plug
while the hotlist is being written.
2015-01-02 12:48:18 +00:00
Vincent Sanders
669df172ec Fix my spelling of teh everywhere 2014-11-18 17:16:26 +00:00
Vincent Sanders
f287379a7c Fix several doxygen issues 2014-11-08 11:38:20 +00:00
Vincent Sanders
f995616509 remove more user warning calls and replace with error returns 2014-10-30 23:27:41 +00:00
Vincent Sanders
db01637343 remove content include from urldb header 2014-07-17 00:18:44 +01:00
Michael Drake
ce4d52e72a Fix hotlist and global_history _get_selection functions.
Broken when selection was folder, rather than entry.
  Renamed tree_node_flags lables to avoid TREE_NODE_NONE name clash.
2014-05-24 15:09:20 +01:00
Vincent Sanders
706c92bf8f remove uneeded includes 2014-05-18 18:51:18 +01:00
Michael Drake
af014bce99 Allow tab creation without history clone. Changes browser_window_create and browser_window_navigate flags. 2014-02-10 14:08:45 +00:00
Vincent Sanders
654da2ffb5 move utf8 conversion routines to use nserror instead of their own error enum 2014-01-28 21:40:13 +00:00
Chris Young
3f591e575d Modify conflicting Messages entry 2013-11-17 16:36:51 +00:00
Michael Drake
b547e1205b Use messages for translations instead of string literals. 2013-11-11 14:32:07 +00:00
Michael Drake
61b5a5e98f Visual indication of hotlist's folder for unsorted entries, with special icon. 2013-11-08 18:53:34 +00:00
Michael Drake
53a6d6becd Show "-" for last visit date/time when visits count is 0. 2013-10-23 13:20:43 +01:00
Michael Drake
f814debfe2 Remove unreachable safty net. 2013-10-23 10:21:36 +01:00
Michael Drake
951ad51cd4 Add functions to get first selected hotlist/global_history node data. 2013-09-13 14:24:25 +01:00
Michael Drake
7f31b2c776 Fix use after unref. 2013-09-08 19:28:57 +01:00
Michael Drake
2468d00675 Check for error as soon as we have return value. 2013-09-05 13:06:53 +01:00
Michael Drake
411e367add Various tidyups to make ownership more clear. 2013-09-05 12:54:15 +01:00
Michael Drake
5d3362be81 Fix dead assignments. 2013-09-05 11:55:49 +01:00
Michael Drake
84b90853b5 Fix dead assignement. 2013-09-05 11:53:19 +01:00
Michael Drake
393dee4fd7 Squash leak in error case. 2013-09-03 20:01:05 +01:00
Michael Drake
541724fb0d Add hotlist iteration function. 2013-09-03 19:43:59 +01:00
Michael Drake
f477fd2570 Remove height getters from treeview client modules API. 2013-09-03 14:44:53 +01:00
Michael Drake
b9e3f7ae3d Ensure tree height is provided when treeview building is complete. 2013-09-03 14:38:01 +01:00
Michael Drake
c2375339a1 Add recursive expand/contract functions to hotlist, global history, and cookie manager modules. 2013-09-03 11:28:02 +01:00
Michael Drake
cf8ffa412a Remove old hotlist, cookies, and history_global_core modules.
New versions of expand/collapse node functions for these modules aren't yet implemented.
2013-09-02 22:41:04 +01:00
Michael Drake
09f5b0e95f Improve callback suppression options. Reduce unnecessary callback usage. 2013-08-30 12:51:40 +01:00
Michael Drake
afaf24378b Add flag to suppress redraw on node creation. 2013-08-29 18:31:58 +01:00