1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

DetailsPanel is now a subclass of HGWindowController.

This commit is contained in:
Virgil Dupras
2010-02-07 16:19:14 +01:00
parent 76d351d8be
commit af41876a5e
5 changed files with 20 additions and 29 deletions

View File

@@ -7,16 +7,16 @@ http://www.hardcoded.net/licenses/hs_license
*/
#import <Cocoa/Cocoa.h>
#import "HSWindowController.h"
#import "PyApp.h"
#import "PyDetailsPanel.h"
@interface DetailsPanel : NSWindowController
@interface DetailsPanel : HSWindowController
{
IBOutlet NSTableView *detailsTable;
PyDetailsPanel *py;
}
- (id)initWithPy:(PyApp *)aPy;
- (PyDetailsPanel *)py;
- (void)toggleVisibility;

View File

@@ -12,17 +12,14 @@ http://www.hardcoded.net/licenses/hs_license
@implementation DetailsPanel
- (id)initWithPy:(PyApp *)aPy
{
self = [super initWithWindowNibName:@"DetailsPanel"];
self = [super initWithNibName:@"DetailsPanel" pyClassName:@"PyDetailsPanel" pyParent:aPy];
[self window]; //So the detailsTable is initialized.
Class pyClass = [Utils classNamed:@"PyDetailsPanel"];
py = [[pyClass alloc] initWithCocoa:self pyParent:aPy];
return self;
}
- (void)dealloc
- (PyDetailsPanel *)py
{
[py release];
[super dealloc];
return (PyDetailsPanel *)py;
}
- (void)refreshDetails
@@ -44,12 +41,12 @@ http://www.hardcoded.net/licenses/hs_license
/* NSTableView Delegate */
- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
{
return [py numberOfRows];
return [[self py] numberOfRows];
}
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)column row:(NSInteger)row
{
return [py valueForColumn:[column identifier] row:row];
return [[self py] valueForColumn:[column identifier] row:row];
}
/* Python --> Cocoa */

View File

@@ -7,9 +7,9 @@ http://www.hardcoded.net/licenses/hs_license
*/
#import <Cocoa/Cocoa.h>
#import "PyGUI.h"
@interface PyDetailsPanel : NSObject
- (id)initWithCocoa:(id)cocoa pyParent:(id)pyParent;
@interface PyDetailsPanel : PyGUI
- (NSInteger)numberOfRows;
- (id)valueForColumn:(NSString *)column row:(NSInteger)row;
@end