1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/MYWindowUtils.m Tue May 12 14:38:30 2009 +0200
1.3 @@ -0,0 +1,27 @@
1.4 +//
1.5 +// MYWindowUtils.m
1.6 +// Murky
1.7 +//
1.8 +// Created by Jens Alfke on 5/5/09.
1.9 +// Copyright 2009 Jens Alfke. All rights reserved.
1.10 +//
1.11 +
1.12 +#import "MYWindowUtils.h"
1.13 +
1.14 +
1.15 +@implementation NSWindow (MYUtilities)
1.16 +
1.17 +
1.18 +- (void) my_setTitleBarIcon: (NSImage*)icon
1.19 +{
1.20 + NSURL *url = nil;
1.21 + if( icon ) {
1.22 + icon = [[icon copy] autorelease];
1.23 + [icon setSize: NSMakeSize(16,16)];
1.24 + url = [NSURL fileURLWithPath: @"/System/XXX"];
1.25 + }
1.26 + [self setRepresentedURL: url];
1.27 + [[self standardWindowButton:NSWindowDocumentIconButton] setImage: icon];
1.28 +}
1.29 +
1.30 +@end