diff options
author | fvogel <fvogelnew1@free.fr> | 2023-07-23 19:55:23 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2023-07-23 19:55:23 (GMT) |
commit | 579158cd72b892717a6b114d41a1922d674ce082 (patch) | |
tree | 7d730770386daa00a5bc0926e3bdbd76cfde6207 /macosx | |
parent | 63c0c1f596d3e50a77c9b77282b3530239397351 (diff) | |
parent | ff75af9fa27175c1e403160473d7d54d3084f0de (diff) | |
download | tk-579158cd72b892717a6b114d41a1922d674ce082.zip tk-579158cd72b892717a6b114d41a1922d674ce082.tar.gz tk-579158cd72b892717a6b114d41a1922d674ce082.tar.bz2 |
Fix [f24725b545]: Aqua: do not treat FourCC as pointer in TkpCreateNativeBitmap(). Patch from Christopher Chavez. Also remove the now unused macro OSTYPE_TO_UTI.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXBitmap.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c index 27a29fa..b1fbd17 100644 --- a/macosx/tkMacOSXBitmap.c +++ b/macosx/tkMacOSXBitmap.c @@ -50,9 +50,6 @@ static BuiltInIcon builtInIcons[] = { #define builtInIconSize 32 -#define OSTYPE_TO_UTI(x) ((NSString *)UTTypeCreatePreferredIdentifierForTag( \ - kUTTagClassOSType, UTCreateStringForOSType(x), nil)) - static Tcl_HashTable iconBitmapTable = {}; typedef struct { int kind, width, height; @@ -175,7 +172,7 @@ TkpCreateNativeBitmap( Display *display, const void *source) /* Info about the icon to build. */ { - NSString *filetype = [NSString stringWithUTF8String:(char *)source]; + NSString *filetype = TkMacOSXOSTypeToUTI(PTR2UINT(source)); NSImage *iconImage = TkMacOSXIconForFileType(filetype); CGSize size = CGSizeMake(builtInIconSize, builtInIconSize); Pixmap pixmap = PixmapFromImage(display, iconImage, size); |