From 67ded2a02a4f3f4d2a0ab156f3343dc93f4ba04c Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 19 Jun 2015 16:29:42 +0100 Subject: 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. --- windows/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'windows') diff --git a/windows/main.c b/windows/main.c index 1997c85d1..b9ef44a3c 100644 --- a/windows/main.c +++ b/windows/main.c @@ -183,10 +183,13 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd) nsoption_read(options_file_location, NULL); nsoption_commandline(&argc, argv, NULL); - /* common initialisation */ + /* message init */ messages = filepath_find(respaths, "messages"); - ret = netsurf_init(messages, NULL); + messages_add_from_file(messages); free(messages); + + /* common initialisation */ + ret = netsurf_init(NULL); if (ret != NSERROR_OK) { free(options_file_location); LOG("NetSurf failed to initialise"); -- cgit v1.2.3