summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-03-15 21:26:33 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-03-15 21:26:33 +0000
commit89ee13de7048e64a98980eda4450299bdbe6532f (patch)
tree6cdee0b29167064816d7ddb0c4a0e390186396be
parentcb2e3f95b8de625993d029eb6d2ffd70f318d35c (diff)
downloadnetsurf-89ee13de7048e64a98980eda4450299bdbe6532f.tar.gz
netsurf-89ee13de7048e64a98980eda4450299bdbe6532f.tar.bz2
Add simple resource: path handler. Lacks language support for now.
svn path=/trunk/netsurf/; revision=12066
-rw-r--r--riscos/gui.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/riscos/gui.c b/riscos/gui.c
index 2ef625863..7bae4cc36 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -283,7 +283,13 @@ static void ro_gui_view_source_bounce(wimp_message *message);
char* gui_find_resource(const char *filename)
{
- return NULL;
+ /* TODO: handle language directories */
+ size_t length = strlen(filename) +
+ SLEN("file:///NetSurf:/Resources/") + 1;
+
+ char *resource_url = malloc(length);
+ resource_url = strcpy(resource_url, "file:///NetSurf:/Resources/");
+ return strcat(resource_url, filename);
}
/**
@@ -404,9 +410,9 @@ static void gui_init(int argc, char** argv)
die("Failed duplicating NetSurf directory string");
/* Initialise stylesheet URLs */
- default_stylesheet_url = strdup("file:///NetSurf:/Resources/CSS");
- quirks_stylesheet_url = strdup("file:///NetSurf:/Resources/Quirks");
- adblock_stylesheet_url = strdup("file:///NetSurf:/Resources/AdBlock");
+ default_stylesheet_url = strdup("resource:CSS");
+ quirks_stylesheet_url = strdup("resource:Quirks");
+ adblock_stylesheet_url = strdup("resource:AdBlock");
if (!default_stylesheet_url || !quirks_stylesheet_url ||
!adblock_stylesheet_url)
die("Failed initialising string constants.");