summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-08-15 19:00:50 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-08-15 19:00:50 +0100
commite5374cc042645cc03bccb37fea0730d88a5ae879 (patch)
treee8ce7553d44292bb54f21ab5c637e5ab621cc9f5 /content
parent5fb51a0fb76707e1b5dac4bbe04613d0396d7bc0 (diff)
downloadnetsurf-e5374cc042645cc03bccb37fea0730d88a5ae879.tar.gz
netsurf-e5374cc042645cc03bccb37fea0730d88a5ae879.tar.bz2
Let contents broadcast explicit status messages as well as announce that their internal status has been updated.
Diffstat (limited to 'content')
-rw-r--r--content/content.c2
-rw-r--r--content/content.h6
2 files changed, 7 insertions, 1 deletions
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 */