mirror of
https://github.com/transmission/transmission
synced 2025-01-31 03:12:44 +00:00
add a missing removeObserver: to the message window controller
This commit is contained in:
parent
a888c4d425
commit
dc31055e53
1 changed files with 22 additions and 1 deletions
|
@ -26,11 +26,17 @@
|
|||
#import "DragOverlayView.h"
|
||||
#import "NSStringAdditions.h"
|
||||
|
||||
@interface DragOverlayWindow (Private)
|
||||
|
||||
- (void) resizeWindow;
|
||||
|
||||
@end
|
||||
|
||||
@implementation DragOverlayWindow
|
||||
|
||||
- (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])))
|
||||
{
|
||||
fLib = lib;
|
||||
|
@ -60,12 +66,18 @@
|
|||
[fFadeOutAnimation setAnimationBlockingMode: NSAnimationNonblockingThreaded];
|
||||
|
||||
[window addChildWindow: self ordered: NSWindowAbove];
|
||||
[self setFrame: [window frame] display: NO];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(resizeWindow)
|
||||
name: NSWindowDidResizeNotification object: window];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
|
||||
[fFadeInAnimation release];
|
||||
[fFadeOutAnimation release];
|
||||
|
||||
|
@ -175,3 +187,12 @@
|
|||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation DragOverlayWindow (Private)
|
||||
|
||||
- (void) resizeWindow
|
||||
{
|
||||
[self setFrame: [[self parentWindow] frame] display: NO];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue