MYWindowUtils.m
author Jens Alfke <jens@mooseyard.com>
Tue May 05 11:09:06 2009 -0700 (2009-05-05)
changeset 28 206903ba35a5
permissions -rw-r--r--
Added MYWindowUtils, being used by Murky.
     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 //
     8 
     9 #import "MYWindowUtils.h"
    10 
    11 
    12 @implementation NSWindow (MYUtilities)
    13 
    14 
    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 }
    26 
    27 @end