2011-09-13 20:31:25 +00:00
|
|
|
/*
|
2015-01-03 21:30:57 +00:00
|
|
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
2011-09-13 20:31:25 +00:00
|
|
|
|
2015-01-03 21:33:16 +00:00
|
|
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
2011-09-13 20:31:25 +00:00
|
|
|
which should be included with this package. The terms are also available at
|
2015-01-03 21:33:16 +00:00
|
|
|
http://www.gnu.org/licenses/gpl-3.0.html
|
2011-09-13 20:31:25 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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
|