diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2010-03-29 20:03:44 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2010-03-29 20:03:44 +0000 |
commit | e00fb7bd2d8eed482d6d9eac1d7fec09e079a25b (patch) | |
tree | 04db289d79ecdc38847e22182d9c5d33d4359ed3 /riscos/gui.c | |
parent | 7e6752726790043bc14c1843690cf9c7d32a6bc6 (diff) | |
download | netsurf-e00fb7bd2d8eed482d6d9eac1d7fec09e079a25b.tar.gz netsurf-e00fb7bd2d8eed482d6d9eac1d7fec09e079a25b.tar.bz2 |
second pass at startup refactor removing the gui_init callback
svn path=/trunk/netsurf/; revision=10205
Diffstat (limited to 'riscos/gui.c')
-rw-r--r-- | riscos/gui.c | 34 |
1 files changed, 17 insertions, 17 deletions
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); |