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

Fixed a bug where re-prioritization criteria list would initially be empty.

That was because the dialog was created on launch time rather than on-the-fly.

--HG--
branch : objp
This commit is contained in:
Virgil Dupras
2012-01-15 17:24:30 -05:00
parent 29796e87b7
commit baa2177439
6 changed files with 10 additions and 9 deletions

View File

@@ -11,6 +11,7 @@ http://www.hardcoded.net/licenses/bsd_license
#import "HSPopUpList.h"
#import "HSSelectableList.h"
#import "PrioritizeList.h"
#import "PyDupeGuru.h"
@interface PrioritizeDialog : NSWindowController
{
@@ -23,7 +24,7 @@ http://www.hardcoded.net/licenses/bsd_license
HSSelectableList *criteriaList;
PrioritizeList *prioritizationList;
}
- (id)initWithPyRef:(PyObject *)aPyRef;
- (id)initWithApp:(PyDupeGuru *)aApp;
- (PyPrioritizeDialog *)model;
- (IBAction)addSelected:(id)sender;

View File

@@ -10,11 +10,11 @@ http://www.hardcoded.net/licenses/bsd_license
#import "Utils.h"
@implementation PrioritizeDialog
- (id)initWithPyRef:(PyObject *)aPyRef
- (id)initWithApp:(PyDupeGuru *)aApp
{
self = [super initWithWindowNibName:@"PrioritizeDialog"];
[self window];
model = [[PyPrioritizeDialog alloc] initWithModel:aPyRef];
model = [[PyPrioritizeDialog alloc] initWithApp:[aApp pyRef]];
[model bindCallback:createCallback(@"PrioritizeDialogView", self)];
categoryPopUp = [[HSPopUpList alloc] initWithPyRef:[[self model] categoryList] popupView:categoryPopUpView];
criteriaList = [[HSSelectableList alloc] initWithPyRef:[[self model] criteriaList] tableView:criteriaTableView];

View File

@@ -272,7 +272,7 @@ http://www.hardcoded.net/licenses/bsd_license
- (IBAction)reprioritizeResults:(id)sender
{
PrioritizeDialog *dlg = [[PrioritizeDialog alloc] initWithPyRef:[model prioritizeDialog]];
PrioritizeDialog *dlg = [[PrioritizeDialog alloc] initWithApp:model];
NSInteger result = [NSApp runModalForWindow:[dlg window]];
if (result == NSRunStoppedResponse) {
[[dlg model] performReprioritization];