diff options
author | Sven Weidauer <sven.weidauer@gmail.com> | 2011-05-10 16:11:54 +0000 |
---|---|---|
committer | Sven Weidauer <sven.weidauer@gmail.com> | 2011-05-10 16:11:54 +0000 |
commit | 27386a45adb7e0074076528ad2779958ff8e8a4f (patch) | |
tree | 83908751f05535a48b889030253ab7f36a46640d /cocoa/apple_image.m | |
parent | b56cbd365b69635a14144fdbbe850024939673b8 (diff) | |
download | netsurf-27386a45adb7e0074076528ad2779958ff8e8a4f.tar.gz netsurf-27386a45adb7e0074076528ad2779958ff8e8a4f.tar.bz2 |
Using the file name and size of an image as title.
svn path=/trunk/netsurf/; revision=12370
Diffstat (limited to 'cocoa/apple_image.m')
-rw-r--r-- | cocoa/apple_image.m | 6 |
1 files 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); |