From f0b264670e57d1eefd6f7e297b87cedf38d8be9a Mon Sep 17 00:00:00 2001 From: James Bursa Date: Thu, 13 Jan 2005 22:42:39 +0000 Subject: [project @ 2005-01-13 22:42:38 by bursa] Start on theme auto-install. Fix content_add_user() not to broadcast error on memory exhaustion. svn path=/import/netsurf/; revision=1448 --- desktop/browser.c | 12 ++++++++++-- desktop/browser.h | 5 +++++ 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'desktop') diff --git a/desktop/browser.c b/desktop/browser.c index 734fde5ae..fc96df12f 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -241,6 +241,15 @@ void browser_window_callback(content_msg msg, struct content *c, if (c->type == CONTENT_OTHER) browser_window_convert_to_download(bw); +#ifdef WITH_THEME_INSTALL + else if (c->type == CONTENT_THEME) { + theme_install_start(c); + bw->loading_content = 0; + content_remove_user(c, browser_window_callback, + bw, 0); + browser_window_stop_throbber(bw); + } +#endif else gui_window_set_url(bw->window, c->url); break; @@ -297,7 +306,7 @@ void browser_window_callback(content_msg msg, struct content *c, bw->scrolling_box = NULL; } browser_window_stop_throbber(bw); - free (bw->referer); + free(bw->referer); bw->referer = 0; break; @@ -1087,7 +1096,6 @@ void browser_redraw_box(struct content *c, struct box *box) data.redraw.object_height = c->height; content_broadcast(c, CONTENT_MSG_REDRAW, data); - } diff --git a/desktop/browser.h b/desktop/browser.h index 2a2776411..a39f78461 100644 --- a/desktop/browser.h +++ b/desktop/browser.h @@ -123,4 +123,9 @@ void schedule(int t, void (*callback)(void *p), void *p); void schedule_remove(void (*callback)(void *p), void *p); void schedule_run(void); +/* In platform specific theme_install.c. */ +#ifdef WITH_THEME_INSTALL +void theme_install_start(struct content *c); +#endif + #endif -- cgit v1.2.3