summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
Diffstat (limited to 'riscos')
-rw-r--r--riscos/gui.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/riscos/gui.c b/riscos/gui.c
index 8f225b540..068512fc9 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -966,15 +966,23 @@ void ro_gui_open_help_page (void)
*/
void ro_gui_view_source(struct content *content)
{
- if (content->type != CONTENT_HTML)
- return;
- xosfile_save_stamped("<Wimp$Scrap>", 0xfff,
- content->data.html.source,
- (content->data.html.source +
- content->data.html.length));
- xos_cli("Filer_Run <Wimp$Scrap>");
- xosfile_set_type("<Wimp$Scrap>", 0xfaf);
+ if (content->type == CONTENT_HTML) {
+ xosfile_save_stamped("<Wimp$Scrap>", 0xfff,
+ content->data.html.source,
+ (content->data.html.source +
+ content->data.html.length));
+ xos_cli("Filer_Run <Wimp$Scrap>");
+ xosfile_set_type("<Wimp$Scrap>", 0xfaf);
+ }
+ else if (content->type == CONTENT_CSS) {
+ xosfile_save_stamped("<Wimp$Scrap>", 0xfff,
+ content->data.css.data,
+ (content->data.css.data +
+ content->data.css.length));
+ xos_cli("Filer_Run <Wimp$Scrap>");
+ xosfile_set_type("<Wimp$Scrap>", 0xf79);
+ }
}