Changeset 10025


Ignore:
Timestamp:
Jan 28, 2010, 3:16:55 AM (12 years ago)
Author:
livings124
Message:

add a missing removeObserver: to the message window controller

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/DragOverlayWindow.m

    r9844 r10025  
    2727#import "NSStringAdditions.h"
    2828
     29@interface DragOverlayWindow (Private)
     30
     31- (void) resizeWindow;
     32
     33@end
     34
    2935@implementation DragOverlayWindow
    3036
    3137- (id) initWithLib: (tr_session *) lib forWindow: (NSWindow *) window
    3238{
    33     if ((self = ([super initWithContentRect: NSMakeRect(0, 0, 1.0, 1.0) styleMask: NSBorderlessWindowMask
     39    if ((self = ([super initWithContentRect: NSZeroRect styleMask: NSBorderlessWindowMask
    3440                    backing: NSBackingStoreBuffered defer: NO])))
    3541    {
     
    6167       
    6268        [window addChildWindow: self ordered: NSWindowAbove];
     69        [self setFrame: [window frame] display: NO];
     70       
     71        [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(resizeWindow)
     72            name: NSWindowDidResizeNotification object: window];
    6373    }
    6474    return self;
     
    6777- (void) dealloc
    6878{
     79    [[NSNotificationCenter defaultCenter] removeObserver: self];
     80   
    6981    [fFadeInAnimation release];
    7082    [fFadeOutAnimation release];
     
    176188
    177189@end
     190
     191@implementation DragOverlayWindow (Private)
     192
     193- (void) resizeWindow
     194{
     195    [self setFrame: [[self parentWindow] frame] display: NO];
     196}
     197
     198@end
Note: See TracChangeset for help on using the changeset viewer.