diff options
author | John Tytgat <joty@netsurf-browser.org> | 2004-06-05 15:03:59 +0000 |
---|---|---|
committer | John Tytgat <joty@netsurf-browser.org> | 2004-06-05 15:03:59 +0000 |
commit | dc65374aa6ccd54fd4b61cacb7bd57b7d756043d (patch) | |
tree | 2164e073695b9d506f3bb9e0a3327d117749b0d5 /content/fetchcache.c | |
parent | ea2cc2312770769604fb14569408f039eaa4c266 (diff) | |
download | netsurf-dc65374aa6ccd54fd4b61cacb7bd57b7d756043d.tar.gz netsurf-dc65374aa6ccd54fd4b61cacb7bd57b7d756043d.tar.bz2 |
[project @ 2004-06-05 15:03:59 by joty]
Created content_set_status() : one centralised place where status_message
in the content struct is updated in a fail safe way.
svn path=/import/netsurf/; revision=928
Diffstat (limited to 'content/fetchcache.c')
-rw-r--r-- | content/fetchcache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/content/fetchcache.c b/content/fetchcache.c index a56da83f9..ed958882e 100644 --- a/content/fetchcache.c +++ b/content/fetchcache.c @@ -171,13 +171,13 @@ void fetchcache_callback(fetch_msg msg, void *p, char *data, unsigned long size) case FETCH_DATA: LOG(("FETCH_DATA")); if (c->total_size) - sprintf(c->status_message, + content_set_status(c, messages_get("RecPercent"), human_friendly_bytesize(c->source_size + size), human_friendly_bytesize(c->total_size), (unsigned int) ((c->source_size + size) * 100.0 / c->total_size)); else - sprintf(c->status_message, + content_set_status(c, messages_get("Received"), human_friendly_bytesize(c->source_size + size)); content_broadcast(c, CONTENT_MSG_STATUS, msg_data); @@ -186,9 +186,9 @@ void fetchcache_callback(fetch_msg msg, void *p, char *data, unsigned long size) case FETCH_FINISHED: LOG(("FETCH_FINISHED")); - sprintf(c->status_message, messages_get("Converting"), - c->source_size); c->fetch = 0; + content_set_status(c, messages_get("Converting"), + c->source_size); content_broadcast(c, CONTENT_MSG_STATUS, msg_data); content_convert(c, c->width, c->height); break; |