summaryrefslogtreecommitdiff
path: root/src/scratchpad.c
diff options
context:
space:
mode:
authorportix <none@none>2012-11-20 12:35:32 +0100
committerportix <none@none>2012-11-20 12:35:32 +0100
commit9cf59535dc1e9cc37237a7ddfefd164a444a2470 (patch)
tree6dfb6425e65d264702bc9009c552054ace57d7fe /src/scratchpad.c
parentbd66e5045613123ee067f829185e3c15353470d3 (diff)
downloaddwb-9cf59535dc1e9cc37237a7ddfefd164a444a2470.zip
Implementing wv.toPng; set base-uri to HOME in sp_load
Diffstat (limited to 'src/scratchpad.c')
-rw-r--r--src/scratchpad.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/scratchpad.c b/src/scratchpad.c
index 00fc0974..5e1308d6 100644
--- a/src/scratchpad.c
+++ b/src/scratchpad.c
@@ -63,8 +63,11 @@ void
scratchpad_load(const char *text) {
if (g_str_has_prefix(text, "file://"))
webkit_web_view_load_uri(WEBKIT_WEB_VIEW(g_scratchpad), text);
- else
- webkit_web_view_load_string(WEBKIT_WEB_VIEW(g_scratchpad), text, NULL, NULL, "scratchpad");
+ else {
+ char *basepath = g_strconcat("file://", g_getenv("HOME"), NULL);
+ webkit_web_view_load_string(WEBKIT_WEB_VIEW(g_scratchpad), text, NULL, NULL, basepath);
+ g_free(basepath);
+ }
}
void