2011-09-13 20:31:25 +00:00
|
|
|
/*
|
2013-04-28 14:35:51 +00:00
|
|
|
Copyright 2013 Hardcoded Software (http://www.hardcoded.net)
|
2011-09-13 20:31:25 +00:00
|
|
|
|
|
|
|
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 "PrioritizeDialog.h"
|
2012-07-24 15:31:18 +00:00
|
|
|
#import "PrioritizeDialog_UI.h"
|
2012-05-28 18:45:13 +00:00
|
|
|
#import "HSPyUtil.h"
|
2011-09-13 20:31:25 +00:00
|
|
|
|
|
|
|
@implementation PrioritizeDialog
|
2012-07-24 15:31:18 +00:00
|
|
|
|
|
|
|
@synthesize categoryPopUpView;
|
|
|
|
@synthesize criteriaTableView;
|
|
|
|
@synthesize prioritizationTableView;
|
|
|
|
|
2012-01-15 22:24:30 +00:00
|
|
|
- (id)initWithApp:(PyDupeGuru *)aApp
|
2011-09-13 20:31:25 +00:00
|
|
|
{
|
2012-01-12 22:40:23 +00:00
|
|
|
self = [super initWithWindowNibName:@"PrioritizeDialog"];
|
2012-01-15 22:24:30 +00:00
|
|
|
model = [[PyPrioritizeDialog alloc] initWithApp:[aApp pyRef]];
|
2012-07-24 15:31:18 +00:00
|
|
|
[self setWindow:createPrioritizeDialog_UI(self)];
|
2012-01-13 20:25:34 +00:00
|
|
|
categoryPopUp = [[HSPopUpList alloc] initWithPyRef:[[self model] categoryList] popupView:categoryPopUpView];
|
|
|
|
criteriaList = [[HSSelectableList alloc] initWithPyRef:[[self model] criteriaList] tableView:criteriaTableView];
|
|
|
|
prioritizationList = [[PrioritizeList alloc] initWithPyRef:[[self model] prioritizationList] tableView:prioritizationTableView];
|
2012-03-19 20:52:08 +00:00
|
|
|
[model bindCallback:createCallback(@"PrioritizeDialogView", self)];
|
2011-09-13 20:31:25 +00:00
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)dealloc
|
|
|
|
{
|
|
|
|
[categoryPopUp release];
|
|
|
|
[criteriaList release];
|
2011-09-16 15:08:24 +00:00
|
|
|
[prioritizationList release];
|
2012-01-13 20:25:34 +00:00
|
|
|
[model release];
|
2011-09-13 20:31:25 +00:00
|
|
|
[super dealloc];
|
|
|
|
}
|
|
|
|
|
2012-01-13 20:25:34 +00:00
|
|
|
- (PyPrioritizeDialog *)model
|
2011-09-13 20:31:25 +00:00
|
|
|
{
|
2012-01-13 20:25:34 +00:00
|
|
|
return (PyPrioritizeDialog *)model;
|
2011-09-13 20:31:25 +00:00
|
|
|
}
|
|
|
|
|
2012-07-24 15:31:18 +00:00
|
|
|
- (void)ok
|
2011-09-13 22:19:46 +00:00
|
|
|
{
|
|
|
|
[NSApp stopModal];
|
2012-01-12 22:40:23 +00:00
|
|
|
[self close];
|
2011-09-13 22:19:46 +00:00
|
|
|
}
|
|
|
|
|
2012-07-24 15:31:18 +00:00
|
|
|
- (void)cancel
|
2011-09-13 22:19:46 +00:00
|
|
|
{
|
|
|
|
[NSApp abortModal];
|
2012-01-12 22:40:23 +00:00
|
|
|
[self close];
|
2011-09-13 22:19:46 +00:00
|
|
|
}
|
2011-09-13 20:31:25 +00:00
|
|
|
@end
|