diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2003-07-22 22:13:44 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2003-07-22 22:13:44 +0000 |
commit | 3c0daf429a15b39a8e5d521449be4306b14f579a (patch) | |
tree | 4abc571db073a984957623de76110ca0a472dbd1 /riscos/gui.c | |
parent | e13bb8daa87c01c0f5a478a96b7fa822955770cd (diff) | |
download | netsurf-3c0daf429a15b39a8e5d521449be4306b14f579a.tar.gz netsurf-3c0daf429a15b39a8e5d521449be4306b14f579a.tar.bz2 |
[project @ 2003-07-22 22:13:44 by jmb]
Enable viewing HTML source when F8 is pressed
svn path=/import/netsurf/; revision=241
Diffstat (limited to 'riscos/gui.c')
-rw-r--r-- | riscos/gui.c | 12 |
1 files changed, 12 insertions, 0 deletions
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) |