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

Converted ProblemDialog to objp.

--HG--
branch : objp
This commit is contained in:
Virgil Dupras
2012-01-13 12:19:23 -05:00
parent 7bce70c128
commit 937ea73c87
11 changed files with 53 additions and 91 deletions

View File

@@ -7,19 +7,17 @@ http://www.hardcoded.net/licenses/bsd_license
*/
#import <Cocoa/Cocoa.h>
#import "HSWindowController.h"
#import "PyApp.h"
#import "PyProblemDialog.h"
#import "HSTable.h"
#import "HSTable2.h"
@interface ProblemDialog : HSWindowController
@interface ProblemDialog : NSWindowController
{
IBOutlet NSTableView *problemTableView;
HSTable *problemTable;
PyProblemDialog *model;
HSTable2 *problemTable;
}
- (id)initWithPy:(PyApp *)aPy;
- (PyProblemDialog *)py;
- (id)init;
- (void)initializeColumns;
- (IBAction)revealSelected:(id)sender;

View File

@@ -10,30 +10,27 @@ http://www.hardcoded.net/licenses/bsd_license
#import "Utils.h"
@implementation ProblemDialog
- (id)initWithPy:(PyApp *)aPy
- (id)init
{
self = [super initWithNibName:@"ProblemDialog" pyClassName:@"PyProblemDialog" pyParent:aPy];
self = [super initWithWindowNibName:@"ProblemDialog"];
[self window]; //So the detailsTable is initialized.
problemTable = [[HSTable alloc] initWithPyClassName:@"PyProblemTable" pyParent:[self py] view:problemTableView];
model = [[PyProblemDialog alloc] initWithModel:findHackishModel(@"problem_dialog")];
problemTable = [[HSTable2 alloc] initWithPyRef:[model problemTable] tableView:problemTableView];
[self initializeColumns];
[self connect];
[problemTable connect];
[model connect];
[[problemTable model] connect];
return self;
}
- (void)dealloc
{
[problemTable disconnect];
[self disconnect];
[[problemTable model] disconnect];
[model disconnect];
[problemTable release];
[model release];
[super dealloc];
}
- (PyProblemDialog *)py
{
return (PyProblemDialog *)py;
}
- (void)initializeColumns
{
HSColumnDef defs[] = {
@@ -46,6 +43,6 @@ http://www.hardcoded.net/licenses/bsd_license
- (IBAction)revealSelected:(id)sender
{
[[self py] revealSelected];
[model revealSelected];
}
@end

View File

@@ -1,14 +0,0 @@
/*
Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
This software is licensed under the "BSD" 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/bsd_license
*/
#import <Cocoa/Cocoa.h>
#import "PyGUI.h"
@interface PyProblemDialog : PyGUI
- (void)revealSelected;
@end

View File

@@ -26,7 +26,7 @@ http://www.hardcoded.net/licenses/bsd_license
[[self window] setContentBorderThickness:28 forEdge:NSMinYEdge];
table = [[ResultTable alloc] initWithView:matches];
statsLabel = [[StatsLabel alloc] initWithLabelView:stats];
problemDialog = [[ProblemDialog alloc] initWithPy:py];
problemDialog = [[ProblemDialog alloc] init];
[self initResultColumns];
[self fillColumnsMenu];
[matches setTarget:self];