summaryrefslogtreecommitdiff
path: root/image/mng.c
diff options
context:
space:
mode:
Diffstat (limited to 'image/mng.c')
-rw-r--r--image/mng.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/image/mng.c b/image/mng.c
index 67625f026..518dc8552 100644
--- a/image/mng.c
+++ b/image/mng.c
@@ -541,7 +541,7 @@ static bool nsmng_convert(struct content *c)
nsmng_content *mng = (nsmng_content *) c;
mng_retcode status;
unsigned long size;
- char title[100];
+ char *title;
assert(c != NULL);
@@ -554,12 +554,15 @@ static bool nsmng_convert(struct content *c)
return nsmng_broadcast_error(mng, -1) == NSERROR_OK;
}
- /* Set the title
- */
- snprintf(title, sizeof(title),
- messages_get("MNGTitle"),
- c->width, c->height, size);
- content__set_title(c, title);
+
+ /* set title text */
+ title = messages_get_buff("MNGTitle",
+ nsurl_access_leaf(llcache_handle_get_url(c->llcache)),
+ c->width, c->height);
+ if (title != NULL) {
+ content__set_title(c, title);
+ free(title);
+ }
c->size += c->width * c->height * 4;
content_set_ready(c);
@@ -599,7 +602,7 @@ static bool nsjpng_convert(struct content *c)
nsmng_content *mng = (nsmng_content *) c;
mng_retcode status;
unsigned long size;
- char title[100];
+ char *title;
mng_handle handle;
assert(c != NULL);
@@ -613,11 +616,14 @@ static bool nsjpng_convert(struct content *c)
return nsmng_broadcast_error(mng, -1) == NSERROR_OK;
}
- /* Set the title */
- snprintf(title, sizeof(title),
- messages_get("PNGTitle"),
- c->width, c->height, size);
- content__set_title(c, title);
+ /* set title text */
+ title = messages_get_buff("PNGTitle",
+ nsurl_access_leaf(llcache_handle_get_url(c->llcache)),
+ c->width, c->height);
+ if (title != NULL) {
+ content__set_title(c, title);
+ free(title);
+ }
c->size += c->width * c->height * 4;
content_set_ready(c);