diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2005-01-23 16:09:05 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2005-01-23 16:09:05 +0000 |
commit | 422df9008913857667ff20bf3ec295c1839cbc45 (patch) | |
tree | e3a122c9b871a9487372ca0d958e3c520f89f777 /riscos/gui.c | |
parent | 54f903d1b457a280f2cf0a677667428dd3dee239 (diff) | |
download | netsurf-422df9008913857667ff20bf3ec295c1839cbc45.tar.gz netsurf-422df9008913857667ff20bf3ec295c1839cbc45.tar.bz2 |
[project @ 2005-01-23 16:09:05 by rjw]
Further work on theme installing
svn path=/import/netsurf/; revision=1463
Diffstat (limited to 'riscos/gui.c')
-rw-r--r-- | riscos/gui.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/riscos/gui.c b/riscos/gui.c index f7e8fa12c..9545ba458 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -68,7 +68,7 @@ int __feature_imagefs_is_file = 1; /**< For UnixLib. */ int __riscosify_control = __RISCOSIFY_NO_SUFFIX | __RISCOSIFY_NO_REVERSE_SUFFIX; -char *NETSURF_DIR; +const char * NETSURF_DIR; char *default_stylesheet_url; char *adblock_stylesheet_url; @@ -175,6 +175,7 @@ static char *ro_path_to_url(const char *path); void gui_init(int argc, char** argv) { + char theme_path[256]; char path[40]; os_error *error; int length; @@ -232,13 +233,6 @@ void gui_init(int argc, char** argv) if (getenv("NetSurf$Start_URI_Handler")) xwimp_start_task("Desktop", 0); - /* Load our chosen theme - */ - ro_gui_theme_initialise(); - descriptor = ro_gui_theme_find(option_theme); - if (!descriptor) descriptor = ro_gui_theme_find("NetSurf"); - ro_gui_theme_apply(descriptor); - /* Open the templates */ if ((length = snprintf(path, sizeof(path), @@ -258,12 +252,22 @@ void gui_init(int argc, char** argv) ro_gui_401login_init(); #endif ro_gui_history_init(); - ro_gui_theme_install_init(); wimp_close_template(); ro_gui_sprites_init(); ro_gui_tree_initialise(); /* must be done after sprite loading */ ro_gui_hotlist_initialise(); + /* Load our chosen theme + */ + ro_gui_theme_initialise(); + descriptor = ro_gui_theme_find(option_theme); + if (!descriptor) { + snprintf(theme_path, 256, "%s.Resources.Theme", NETSURF_DIR); + theme_path[255] = '\0'; + descriptor = ro_gui_theme_find(theme_path); + } + ro_gui_theme_apply(descriptor); + /* We don't create an Iconbar icon on NCOS */ #ifndef ncos ro_gui_icon_bar_create(); |