1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-26 07:52:38 +00:00

add a missing removeObserver: to the message window controller

This commit is contained in:
Mitchell Livingston 2010-01-28 03:16:55 +00:00
parent a888c4d425
commit dc31055e53

View file

@ -26,11 +26,17 @@
#import "DragOverlayView.h" #import "DragOverlayView.h"
#import "NSStringAdditions.h" #import "NSStringAdditions.h"
@interface DragOverlayWindow (Private)
- (void) resizeWindow;
@end
@implementation DragOverlayWindow @implementation DragOverlayWindow
- (id) initWithLib: (tr_session *) lib forWindow: (NSWindow *) window - (id) initWithLib: (tr_session *) lib forWindow: (NSWindow *) window
{ {
if ((self = ([super initWithContentRect: NSMakeRect(0, 0, 1.0, 1.0) styleMask: NSBorderlessWindowMask if ((self = ([super initWithContentRect: NSZeroRect styleMask: NSBorderlessWindowMask
backing: NSBackingStoreBuffered defer: NO]))) backing: NSBackingStoreBuffered defer: NO])))
{ {
fLib = lib; fLib = lib;
@ -60,12 +66,18 @@
[fFadeOutAnimation setAnimationBlockingMode: NSAnimationNonblockingThreaded]; [fFadeOutAnimation setAnimationBlockingMode: NSAnimationNonblockingThreaded];
[window addChildWindow: self ordered: NSWindowAbove]; [window addChildWindow: self ordered: NSWindowAbove];
[self setFrame: [window frame] display: NO];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(resizeWindow)
name: NSWindowDidResizeNotification object: window];
} }
return self; return self;
} }
- (void) dealloc - (void) dealloc
{ {
[[NSNotificationCenter defaultCenter] removeObserver: self];
[fFadeInAnimation release]; [fFadeInAnimation release];
[fFadeOutAnimation release]; [fFadeOutAnimation release];
@ -175,3 +187,12 @@
} }
@end @end
@implementation DragOverlayWindow (Private)
- (void) resizeWindow
{
[self setFrame: [[self parentWindow] frame] display: NO];
}
@end