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