2009-08-05 08:59:46 +00:00
|
|
|
/*
|
|
|
|
Copyright 2009 Hardcoded Software (http://www.hardcoded.net)
|
|
|
|
|
|
|
|
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
|
|
which should be included with this package. The terms are also available at
|
|
|
|
http://www.hardcoded.net/licenses/hs_license
|
|
|
|
*/
|
|
|
|
|
2009-06-15 12:33:58 +00:00
|
|
|
#import "DetailsPanel.h"
|
2009-06-15 12:53:47 +00:00
|
|
|
#import "Consts.h"
|
2009-06-15 12:33:58 +00:00
|
|
|
|
|
|
|
@implementation DetailsPanelBase
|
|
|
|
- (id)initWithPy:(PyApp *)aPy
|
|
|
|
{
|
2009-10-25 10:42:00 +00:00
|
|
|
self = [super initWithWindowNibName:@"DetailsPanel"];
|
2009-06-15 12:33:58 +00:00
|
|
|
[self window]; //So the detailsTable is initialized.
|
|
|
|
[detailsTable setPy:aPy];
|
2009-06-15 12:53:47 +00:00
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(duplicateSelectionChanged:) name:DuplicateSelectionChangedNotification object:nil];
|
2009-06-15 12:33:58 +00:00
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)refresh
|
|
|
|
{
|
|
|
|
[detailsTable reloadData];
|
|
|
|
}
|
2009-06-15 12:53:47 +00:00
|
|
|
|
|
|
|
/* Notifications */
|
|
|
|
- (void)duplicateSelectionChanged:(NSNotification *)aNotification
|
|
|
|
{
|
|
|
|
if ([[self window] isVisible])
|
|
|
|
[self refresh];
|
|
|
|
}
|
2009-06-15 12:33:58 +00:00
|
|
|
@end
|