From 27386a45adb7e0074076528ad2779958ff8e8a4f Mon Sep 17 00:00:00 2001 From: Sven Weidauer Date: Tue, 10 May 2011 16:11:54 +0000 Subject: Using the file name and size of an image as title. svn path=/trunk/netsurf/; revision=12370 --- cocoa/apple_image.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cocoa/apple_image.m b/cocoa/apple_image.m index 1cf3d722e..64d3dc0c8 100644 --- a/cocoa/apple_image.m +++ b/cocoa/apple_image.m @@ -153,9 +153,9 @@ bool apple_image_convert(struct content *c) c->width = [image pixelsWide]; c->height = [image pixelsHigh]; - char title[100]; - snprintf( title, sizeof title, "Image (%dx%d)", c->width, c->height ); - content__set_title(c, title ); + NSString *url = [NSString stringWithUTF8String: llcache_handle_get_url( content_get_llcache_handle( c ) )]; + NSString *title = [NSString stringWithFormat: @"%@ (%dx%d)", [url lastPathComponent], c->width, c->height]; + content__set_title(c, [title UTF8String] ); content_set_ready(c); content_set_done(c); -- cgit v1.2.3