From fff5f231ed84b05d0c062e87055c600f419ec15b Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 17 Oct 2004 22:13:35 +0000 Subject: [project @ 2004-10-17 22:13:34 by jmb] Lose hard-coded stylesheet URLs. svn path=/import/netsurf/; revision=1323 --- riscos/gui.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'riscos/gui.c') diff --git a/riscos/gui.c b/riscos/gui.c index 7edaa2a6f..745220a68 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -68,6 +68,9 @@ int __riscosify_control = __RISCOSIFY_NO_SUFFIX | char *NETSURF_DIR; +char *default_stylesheet_url; +char *adblock_stylesheet_url; + /** The pointer is over a window which is tracking mouse movement. */ static bool gui_track = false; /** Handle of window which the pointer is over. */ @@ -196,6 +199,9 @@ void gui_init(int argc, char** argv) messages_load(path); messages_load(".Resources.LangNames"); + default_stylesheet_url = strdup("file://Resources/CSS"); + adblock_stylesheet_url = strdup("file://Resources/AdBlock"); + /* Totally pedantic, but base the taskname on the build options. */ #ifndef ncos @@ -516,6 +522,8 @@ void gui_quit(void) ro_gui_history_quit(); free(gui_sprites); xwimp_close_down(task_handle); + free(default_stylesheet_url); + free(adblock_stylesheet_url); xhourglass_off(); } @@ -1484,6 +1492,11 @@ void ro_gui_open_help_page(const char *page) void ro_gui_view_source(struct content *content) { + if (!content || !content->source_data) { + warn_user("MiscError", "No document source"); + return; + } + xosfile_save_stamped("", 0xfff, content->source_data, content->source_data + content->source_size); -- cgit v1.2.3