1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +00:00

Remove observer in filter buttons when finished.

This commit is contained in:
Mitchell Livingston 2006-07-30 20:53:25 +00:00
parent 1695af3aec
commit 45563c6d22
2 changed files with 15 additions and 15 deletions

View file

@ -51,6 +51,19 @@
return self;
}
- (void) dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver: self];
[fButtonNormal release];
[fButtonOver release];
[fButtonPressed release];
[fButtonSelected release];
[fButtonSelectedDim release];
[super dealloc];
}
//call only once
- (void) createButtons
{
@ -200,17 +213,6 @@
[highlightedDimAttributes release];
}
- (void) dealloc
{
[fButtonNormal release];
[fButtonOver release];
[fButtonPressed release];
[fButtonSelected release];
[fButtonSelectedDim release];
[super dealloc];
}
- (void) mouseEntered: (NSEvent *) event
{
if (!fEnabled)

View file

@ -533,8 +533,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
- (void) openSheetClosed: (NSOpenPanel *) panel returnCode: (int) code contextInfo: (void *) info
{
if (code == NSOKButton)
[self performSelectorOnMainThread: @selector(openFromSheet:)
withObject: [panel filenames] waitUntilDone: NO];
[self performSelectorOnMainThread: @selector(openFromSheet:) withObject: [panel filenames] waitUntilDone: NO];
}
- (void) openFromSheet: (NSArray *) filenames
@ -789,7 +788,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
//if save successful, copy torrent to new location with name of data file
if (code == NSOKButton)
[[NSFileManager defaultManager] copyPath: [[torrents objectAtIndex: 0] torrentLocation]
toPath: [panel filename] handler: nil];
toPath: [panel filename] handler: nil];
[torrents removeObjectAtIndex: 0];
[self performSelectorOnMainThread: @selector(copyTorrentFileForTorrents:)
@ -800,7 +799,6 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
{
NSIndexSet * indexSet = [fTableView selectedRowIndexes];
unsigned int i;
for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
[[fFilteredTorrents objectAtIndex: i] revealData];
}