diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2010-02-17 13:55:26 -0300 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2010-02-17 13:55:26 -0300 |
commit | 9ec7bf0cf9413566ebb50fd5a3d388cbfaaaa013 (patch) | |
tree | 410dc4d5b71aeca4d0a0aac28f79a2dcb21c3af7 /src/nav.c | |
parent | f8d6d864ed3b9bd82564b73ef264bd834f2e1bf2 (diff) |
Implement the view source functionality as a dpi
Diffstat (limited to 'src/nav.c')
-rw-r--r-- | src/nav.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -583,3 +583,23 @@ void a_Nav_unref_buf(const DilloUrl *Url) { a_Capi_unref_buf(Url); } + +/* + * Send source to a dpi + */ +void a_Nav_send_source(BrowserWindow *bw, const DilloUrl *url) +{ + char *buf; + int buf_size; + DilloUrl *vs_url; + + if (a_Nav_get_buf(url, &buf, &buf_size)) { + vs_url = a_Url_new("dpi:/vsource/", NULL); + a_UIcmd_open_url_nt(bw, vs_url, 1); + a_Url_free(vs_url); + + /* send the page's source to this dpi connection */ + a_Capi_dpi_send_source(bw, url, buf, buf_size); + a_Nav_unref_buf(url); + } +} |