From e00fb7bd2d8eed482d6d9eac1d7fec09e079a25b Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 29 Mar 2010 20:03:44 +0000 Subject: second pass at startup refactor removing the gui_init callback svn path=/trunk/netsurf/; revision=10205 --- riscos/gui.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'riscos') diff --git a/riscos/gui.c b/riscos/gui.c index 3f60d5777..007466f55 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -280,7 +280,7 @@ static void *myrealloc(void *ptr, size_t len, void *pw) * Initialise the gui (RISC OS specific part). */ -void gui_init(int argc, char** argv) +static void gui_init(int argc, char** argv) { char path[40]; os_error *error; @@ -319,20 +319,6 @@ void gui_init(int argc, char** argv) HUBBUB_OK) die("Failed to initialise HTML parsing library."); - /* Read in the options */ - options_read("NetSurf:Choices"); - - /* Choose the interface language to use */ - ro_gui_choose_language(); - - /* Load in our language-specific Messages */ - if ((length = snprintf(path, sizeof(path), - "NetSurf:Resources.%s.Messages", - option_language)) < 0 || length >= (int)sizeof(path)) - die("Failed to locate Messages resource."); - messages_load(path); - messages_load("NetSurf:Resources.LangNames"); - /* Set defaults for absent option strings */ if (!option_theme) option_theme = strdup("Aletheia"); @@ -762,8 +748,22 @@ int main(int argc, char** argv) { setbuf(stderr, NULL); - /* initialise netsurf */ - netsurf_init(argc, argv); +#if RISCOS_MESSAGES_CHOICE + /* Choose the interface language to use */ + ro_gui_choose_language(); + + /* Load in our language-specific Messages */ + if ((length = snprintf(path, sizeof(path), + "NetSurf:Resources.%s.Messages", + option_language)) < 0 || length >= (int)sizeof(path)) + die("Failed to locate Messages resource."); + messages_load(path); + messages_load("NetSurf:Resources.LangNames"); +#endif + + netsurf_init(&argc, &argv, "NetSurf:Choices", messages); + + gui_init(argc, argv); gui_init2(argc, argv); -- cgit v1.2.3