diff options
author | jcid <devnull@localhost> | 2007-11-14 22:27:26 +0100 |
---|---|---|
committer | jcid <devnull@localhost> | 2007-11-14 22:27:26 +0100 |
commit | d56cac735b0548bbca874839094fc42774d66d96 (patch) | |
tree | 8de00866aebbb33ffe188adb6d2c492aa07cd74a /src/bw.c | |
parent | ec1b4def65f1a2197cd7c575f8332d7d7d3f1276 (diff) |
Implemented "Load Images" in the page menu and cleaned up html.hh.
Diffstat (limited to 'src/bw.c')
-rw-r--r-- | src/bw.c | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -71,6 +71,7 @@ BrowserWindow *a_Bw_new(int width, int height, uint32_t xid) bw->NumImages = 0; bw->NumImagesGot = 0; bw->PageUrls = dList_new(8); + bw->Docs = dList_new(8); bw->question_dialog_data = NULL; @@ -96,6 +97,7 @@ void a_Bw_free(BrowserWindow *bw) dList_free(bw->RootClients); dList_free(bw->ImageClients); + dList_free(bw->Docs); for (j = 0; j < dList_length(bw->PageUrls); ++j) a_Url_free(dList_nth_data(bw->PageUrls, j)); @@ -194,7 +196,7 @@ void a_Bw_stop_clients(BrowserWindow *bw, int flags) } } -/*- PageUrls ---------------------------------------------------------------*/ +/*- Page -------------------------------------------------------------------*/ /* * Add an URL to the browser window's list. * This helps us keep track of page-requested URLs so that it's @@ -209,6 +211,28 @@ void a_Bw_add_url(BrowserWindow *bw, const DilloUrl *Url) } } +/* + * Add a document to the browser window's list. + */ +void a_Bw_add_doc(BrowserWindow *bw, void *vdoc) +{ + dReturn_if_fail ( bw != NULL && vdoc != NULL); + + dList_append(bw->Docs, vdoc); +} + +/* + * Remove a document from the bw's list + */ +void a_Bw_remove_doc(BrowserWindow *bw, void *vdoc) +{ + void *data; + + if ((data = dList_find(bw->Docs, vdoc))) { + dList_remove_fast(bw->Docs, data); + } +} + /*- Cleanup ----------------------------------------------------------------*/ /* * Empty RootClients, ImageClients and PageUrls lists and |