diff options
-rw-r--r-- | src/html.cc | 6 | ||||
-rw-r--r-- | src/nav.c | 6 | ||||
-rw-r--r-- | src/web.cc | 5 | ||||
-rw-r--r-- | src/web.hh | 3 |
4 files changed, 9 insertions, 11 deletions
diff --git a/src/html.cc b/src/html.cc index 4cbcef1b..a50a183f 100644 --- a/src/html.cc +++ b/src/html.cc @@ -2138,8 +2138,7 @@ static bool Html_load_image(BrowserWindow *bw, DilloUrl *url, DilloWeb *Web; int ClientKey; /* Fill a Web structure for the cache query */ - Web = a_Web_new(url, requester); - Web->bw = bw; + Web = a_Web_new(bw, url, requester); Web->Image = Image; a_Image_ref(Image); Web->flags |= WEB_Image; @@ -2967,8 +2966,7 @@ void a_Html_load_stylesheet(DilloHtml *html, DilloUrl *url) } else { /* Fill a Web structure for the cache query */ int ClientKey; - DilloWeb *Web = a_Web_new(url, html->page_url); - Web->bw = html->bw; + DilloWeb *Web = a_Web_new(html->bw, url, html->page_url); if ((ClientKey = a_Capi_open_url(Web, Html_css_load_callback, NULL))) { ++html->bw->NumPendingStyleSheets; a_Bw_add_client(html->bw, ClientKey, 0); @@ -232,8 +232,7 @@ static void Nav_open_url(BrowserWindow *bw, const DilloUrl *url, // a_Menu_pagemarks_new(bw); - Web = a_Web_new(url, requester); - Web->bw = bw; + Web = a_Web_new(bw, url, requester); Web->flags |= WEB_RootUrl; if ((ClientKey = a_Capi_open_url(Web, NULL, NULL)) != 0) { a_Bw_add_client(bw, ClientKey, 1); @@ -566,8 +565,7 @@ static void Nav_save_cb(int Op, CacheClient_t *Client) void a_Nav_save_url(BrowserWindow *bw, const DilloUrl *url, const char *filename) { - DilloWeb *Web = a_Web_new(url, NULL); - Web->bw = bw; + DilloWeb *Web = a_Web_new(bw, url, NULL); Web->filename = dStrdup(filename); Web->flags |= WEB_Download; /* TODO: keep track of this client */ @@ -109,14 +109,15 @@ int a_Web_dispatch_by_type (const char *Type, DilloWeb *Web, /* * Allocate and set safe values for a DilloWeb structure */ -DilloWeb* a_Web_new(const DilloUrl *url, const DilloUrl *requester) +DilloWeb* a_Web_new(BrowserWindow *bw, const DilloUrl *url, + const DilloUrl *requester) { DilloWeb *web= dNew(DilloWeb, 1); _MSG(" a_Web_new: ValidWebs ==> %d\n", dList_length(ValidWebs)); web->url = a_Url_dup(url); web->requester = a_Url_dup(requester); - web->bw = NULL; + web->bw = bw; web->flags = 0; web->Image = NULL; web->filename = NULL; @@ -36,7 +36,8 @@ struct _DilloWeb { }; void a_Web_init(void); -DilloWeb* a_Web_new (const DilloUrl* url, const DilloUrl *requester); +DilloWeb* a_Web_new (BrowserWindow *bw, const DilloUrl* url, + const DilloUrl *requester); int a_Web_valid(DilloWeb *web); void a_Web_free (DilloWeb*); int a_Web_dispatch_by_type (const char *Type, DilloWeb *web, |