From e5374cc042645cc03bccb37fea0730d88a5ae879 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 15 Aug 2012 19:00:50 +0100 Subject: Let contents broadcast explicit status messages as well as announce that their internal status has been updated. --- content/content.c | 2 ++ content/content.h | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'content') diff --git a/content/content.c b/content/content.c index 8b089cd1e..758a615ce 100644 --- a/content/content.c +++ b/content/content.c @@ -169,6 +169,7 @@ nserror content_llcache_callback(llcache_handle *llcache, (void) llcache_handle_get_source_data(llcache, &source_size); content_set_status(c, messages_get("Processing")); + msg_data.explicit_status_text = NULL; content_broadcast(c, CONTENT_MSG_STATUS, msg_data); content_convert(c); @@ -182,6 +183,7 @@ nserror content_llcache_callback(llcache_handle *llcache, break; case LLCACHE_EVENT_PROGRESS: content_set_status(c, event->data.msg); + msg_data.explicit_status_text = NULL; content_broadcast(c, CONTENT_MSG_STATUS, msg_data); break; } diff --git a/content/content.h b/content/content.h index ab569dd64..f1ff2a2c9 100644 --- a/content/content.h +++ b/content/content.h @@ -107,9 +107,13 @@ union content_msg_data { int object_width, object_height; } redraw; /** CONTENT_MSG_REFRESH - Minimum delay */ - int delay; + int delay; /** CONTENT_MSG_REFORMAT - Reformat should not cause a redraw */ bool background; + /** CONTENT_MSG_STATUS - Status message update. If NULL, the content's + * internal status text has been updated, and listener should use + * content_get_status_message() */ + const char *explicit_status_text; /** CONTENT_MSG_DOWNLOAD - Low-level cache handle */ struct llcache_handle *download; /** CONTENT_MSG_RFC5988_LINK - rfc5988 link data */ -- cgit v1.2.3