From 09b1ede5a3fe5c37e34fe1c13780536f30297806 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Tue, 15 Apr 2003 17:53:00 +0000 Subject: [project @ 2003-04-15 17:53:00 by bursa] Inline images and related. svn path=/import/netsurf/; revision=125 --- content/content.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'content/content.c') diff --git a/content/content.c b/content/content.c index 439c0fba2..5a9e2956b 100644 --- a/content/content.c +++ b/content/content.c @@ -1,5 +1,5 @@ /** - * $Id: content.c,v 1.6 2003/04/06 18:09:34 bursa Exp $ + * $Id: content.c,v 1.7 2003/04/15 17:53:00 bursa Exp $ */ #include @@ -75,6 +75,7 @@ struct content * content_create(content_type type, char *url) c->status = CONTENT_LOADING; c->size = sizeof(struct content); c->status_callback = 0; + strcpy(c->status_message, "Loading"); handler_map[type].create(c); return c; } @@ -102,9 +103,11 @@ int content_convert(struct content *c, unsigned long width, unsigned long height assert(c != 0); assert(c->type < CONTENT_OTHER); assert(c->status == CONTENT_LOADING); + c->available_width = width; if (handler_map[c->type].convert(c, width, height)) return 1; - c->status = CONTENT_READY; + if (c->status == CONTENT_LOADING) + c->status = CONTENT_DONE; return 0; } @@ -118,7 +121,8 @@ void content_revive(struct content *c, unsigned long width, unsigned long height { assert(c != 0); assert(c->type < CONTENT_OTHER); - assert(c->status == CONTENT_READY); + assert(c->status == CONTENT_DONE); + c->available_width = width; handler_map[c->type].revive(c, width, height); } @@ -131,7 +135,8 @@ void content_reformat(struct content *c, unsigned long width, unsigned long heig { assert(c != 0); assert(c->type < CONTENT_OTHER); - assert(c->status == CONTENT_READY); + assert(c->status != CONTENT_LOADING); + c->available_width = width; handler_map[c->type].reformat(c, width, height); } -- cgit v1.2.3