From 3c0daf429a15b39a8e5d521449be4306b14f579a Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 22 Jul 2003 22:13:44 +0000 Subject: [project @ 2003-07-22 22:13:44 by jmb] Enable viewing HTML source when F8 is pressed svn path=/import/netsurf/; revision=241 --- riscos/gui.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'riscos/gui.c') diff --git a/riscos/gui.c b/riscos/gui.c index 4c46efdff..b4bad929f 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -2065,6 +2065,18 @@ void ro_gui_keypress(wimp_key* key) browser_window_open_location(g->data.browser.bw, g->url); return; } + else if (key->c == wimp_KEY_F8) + { + /* TODO: use some protocol so it's type as HTML not Text. */ + if(g->data.browser.bw->current_content->type == CONTENT_HTML || + g->data.browser.bw->current_content->type == CONTENT_TEXTPLAIN) + xosfile_save_stamped("Pipe:$.Source", osfile_TYPE_TEXT, + g->data.browser.bw->current_content->data.html.source, + (g->data.browser.bw->current_content->data.html.source + + g->data.browser.bw->current_content->data.html.length)); + xosfile_set_type("Pipe:$.Source", osfile_TYPE_TEXT); + xos_cli("Filer_Run Pipe:$.Source"); + } else if (key->c == wimp_KEY_F9) { if (g->data.browser.bw->current_content->type == CONTENT_HTML) -- cgit v1.2.3