mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-27 08:50:02 +03:00
[project @ 2003-11-04 18:34:46 by bursa]
Fix downloads from cache. svn path=/import/netsurf/; revision=401
This commit is contained in:
parent
804ee03ea6
commit
94a175d78a
@ -316,26 +316,29 @@ void browser_window_callback(content_msg msg, struct content *c,
|
||||
switch (msg)
|
||||
{
|
||||
case CONTENT_MSG_LOADING:
|
||||
case CONTENT_MSG_READY:
|
||||
case CONTENT_MSG_DONE:
|
||||
if (c->type == CONTENT_OTHER) {
|
||||
gui_window *download_window;
|
||||
/* TODO: implement downloads */
|
||||
/* we probably want to open a new window with a save icon and progress bar,
|
||||
* and transfer content_loading to it */
|
||||
assert(bw->loading_content == c);
|
||||
|
||||
/* create download window and add content to it */
|
||||
download_window = gui_create_download_window(c);
|
||||
content_add_user(c, download_window_callback, download_window, 0);
|
||||
if (msg == CONTENT_MSG_DONE)
|
||||
download_window_callback(CONTENT_MSG_DONE, c, download_window, 0, 0);
|
||||
|
||||
/* remove content from browser window */
|
||||
bw->loading_content = 0;
|
||||
content_remove_user(c, browser_window_callback, bw, 0);
|
||||
browser_window_stop_throbber(bw);
|
||||
}
|
||||
break;
|
||||
|
||||
case CONTENT_MSG_READY:
|
||||
case CONTENT_MSG_DONE:
|
||||
break;
|
||||
}
|
||||
|
||||
if (msg == CONTENT_MSG_LOADING)
|
||||
break;
|
||||
|
||||
previous_safety = gui_window_set_redraw_safety(bw->window, UNSAFE);
|
||||
if (bw->loading_content == c) {
|
||||
struct gui_message gmsg;
|
||||
|
Loading…
Reference in New Issue
Block a user