author | Jens Alfke <jens@mooseyard.com> |
Tue May 05 11:09:06 2009 -0700 (2009-05-05) | |
changeset 28 | 206903ba35a5 |
permissions | -rw-r--r-- |
1 //
2 // MYWindowUtils.m
3 // Murky
4 //
5 // Created by Jens Alfke on 5/5/09.
6 // Copyright 2009 Jens Alfke. All rights reserved.
7 //
9 #import "MYWindowUtils.h"
12 @implementation NSWindow (MYUtilities)
15 - (void) my_setTitleBarIcon: (NSImage*)icon
16 {
17 NSURL *url = nil;
18 if( icon ) {
19 icon = [[icon copy] autorelease];
20 [icon setSize: NSMakeSize(16,16)];
21 url = [NSURL fileURLWithPath: @"/System/XXX"];
22 }
23 [self setRepresentedURL: url];
24 [[self standardWindowButton:NSWindowDocumentIconButton] setImage: icon];
25 }
27 @end