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:
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user