mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 20:46:50 +03:00
Unstackify RISC OS content handler's title setting.
This commit is contained in:
parent
baf50cec89
commit
33d40a08af
@ -172,7 +172,7 @@ bool artworks_convert(struct content *c)
|
||||
void *init_routine;
|
||||
os_error *error;
|
||||
int used = -1; /* slightly better with older OSLib versions */
|
||||
char title[512];
|
||||
char *title;
|
||||
|
||||
/* check whether AWViewer has been seen and we can therefore
|
||||
locate the ArtWorks rendering modules */
|
||||
@ -263,10 +263,13 @@ bool artworks_convert(struct content *c)
|
||||
c->width = (aw->x1 - aw->x0) / 512;
|
||||
c->height = (aw->y1 - aw->y0) / 512;
|
||||
|
||||
snprintf(title, sizeof(title), messages_get("ArtWorksTitle"),
|
||||
title = messages_get_buff("ArtWorksTitle",
|
||||
nsurl_access_leaf(llcache_handle_get_url(c->llcache)),
|
||||
c->width, c->height);
|
||||
content__set_title(c, title);
|
||||
if (title != NULL) {
|
||||
content__set_title(c, title);
|
||||
free(title);
|
||||
}
|
||||
content_set_ready(c);
|
||||
content_set_done(c);
|
||||
/* Done: update status bar */
|
||||
|
@ -113,7 +113,7 @@ bool draw_convert(struct content *c)
|
||||
const void *data;
|
||||
os_box bbox;
|
||||
os_error *error;
|
||||
char title[512];
|
||||
char *title;
|
||||
|
||||
source_data = content__get_source_data(c, &source_size);
|
||||
data = source_data;
|
||||
@ -141,10 +141,14 @@ bool draw_convert(struct content *c)
|
||||
|
||||
draw->x0 = bbox.x0;
|
||||
draw->y0 = bbox.y0;
|
||||
snprintf(title, sizeof(title), messages_get("DrawTitle"),
|
||||
|
||||
title = messages_get_buff("DrawTitle",
|
||||
nsurl_access_leaf(llcache_handle_get_url(c->llcache)),
|
||||
c->width, c->height);
|
||||
content__set_title(c, title);
|
||||
if (title != NULL) {
|
||||
content__set_title(c, title);
|
||||
free(title);
|
||||
}
|
||||
|
||||
content_set_ready(c);
|
||||
content_set_done(c);
|
||||
|
@ -111,7 +111,7 @@ bool sprite_convert(struct content *c)
|
||||
const char *source_data;
|
||||
unsigned long source_size;
|
||||
const void *sprite_data;
|
||||
char title[512];
|
||||
char *title;
|
||||
|
||||
source_data = content__get_source_data(c, &source_size);
|
||||
|
||||
@ -140,10 +140,15 @@ bool sprite_convert(struct content *c)
|
||||
|
||||
c->width = w;
|
||||
c->height = h;
|
||||
snprintf(title, sizeof(title), messages_get("SpriteTitle"),
|
||||
|
||||
/* set title text */
|
||||
title = messages_get_buff("SpriteTitle",
|
||||
nsurl_access_leaf(llcache_handle_get_url(c->llcache)),
|
||||
c->width, c->height);
|
||||
content__set_title(c, title);
|
||||
if (title != NULL) {
|
||||
content__set_title(c, title);
|
||||
free(title);
|
||||
}
|
||||
content_set_ready(c);
|
||||
content_set_done(c);
|
||||
/* Done: update status bar */
|
||||
|
Loading…
Reference in New Issue
Block a user