diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-06-19 16:29:42 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-06-21 23:27:22 +0100 |
commit | 67ded2a02a4f3f4d2a0ab156f3343dc93f4ba04c (patch) | |
tree | 3110af1e6d0bea57725b74db6efeb3a821628890 /monkey | |
parent | 335bbe4f52b9fdb74e377b83906eaab4456666cf (diff) | |
download | netsurf-67ded2a02a4f3f4d2a0ab156f3343dc93f4ba04c.tar.gz netsurf-67ded2a02a4f3f4d2a0ab156f3343dc93f4ba04c.tar.bz2 |
This moves message loading out of netsurf_init into each frontend
The translated message loading is dependant on configuration of
resource location in each frontend, additionally they should have the
ability to deal with errors in this loading in a implementation
specific manner.
This also extends the message loading API to be capable of loading
from an inline memory buffer instead of from a file.
Diffstat (limited to 'monkey')
-rw-r--r-- | monkey/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/monkey/main.c b/monkey/main.c index 81406bc27..2b1a3bc52 100644 --- a/monkey/main.c +++ b/monkey/main.c @@ -172,9 +172,14 @@ main(int argc, char **argv) free(options); nsoption_commandline(&argc, argv, nsoptions); - /* common initialisation */ messages = filepath_find(respaths, "Messages"); - ret = netsurf_init(messages, NULL); + ret = messages_add_from_file(messages); + if (ret != NSERROR_OK) { + LOG("Messages failed to load"); + } + + /* common initialisation */ + ret = netsurf_init(NULL); free(messages); if (ret != NSERROR_OK) { die("NetSurf failed to initialise"); |