diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-10-28 17:27:02 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-10-28 17:27:02 +0000 |
commit | ca25116c3aa8e8099a987c0f320c9385f6044b80 (patch) | |
tree | 9a69615c04fc8b24a69a5328268fd725a472233f /image/gif.c | |
parent | 98cfc5835ccd643578a269a934e8e96487ac1bf8 (diff) | |
parent | 33d40a08af97bae7e12164c5df5c3d2029dcf182 (diff) | |
download | netsurf-ca25116c3aa8e8099a987c0f320c9385f6044b80.tar.gz netsurf-ca25116c3aa8e8099a987c0f320c9385f6044b80.tar.bz2 |
Merge branch 'master' of git://git.netsurf-browser.org/netsurf
Diffstat (limited to 'image/gif.c')
-rw-r--r-- | image/gif.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/image/gif.c b/image/gif.c index 93316e03e..704c9710b 100644 --- a/image/gif.c +++ b/image/gif.c @@ -242,7 +242,7 @@ static bool nsgif_convert(struct content *c) union content_msg_data msg_data; const char *data; unsigned long size; - char title[100]; + char *title; /* Get the animation */ data = content__get_source_data(c, &size); @@ -275,14 +275,20 @@ static bool nsgif_convert(struct content *c) return false; } - /* Store our content width and description */ + /* Store our content width, height and calculate size */ c->width = gif->gif->width; c->height = gif->gif->height; - snprintf(title, sizeof(title), messages_get("GIFTitle"), - c->width, c->height, size); - content__set_title(c, title); c->size += (gif->gif->width * gif->gif->height * 4) + 16 + 44; + /* set title text */ + title = messages_get_buff("GIFTitle", + nsurl_access_leaf(llcache_handle_get_url(c->llcache)), + c->width, c->height); + if (title != NULL) { + content__set_title(c, title); + free(title); + } + /* Schedule the animation if we have one */ gif->current_frame = 0; if (gif->gif->frame_count_partial > 1) |