mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 22:51:39 +00:00
Create the extra fairware reminder on-the-fly rather than on launch time.
--HG-- branch : objp
This commit is contained in:
@@ -211,7 +211,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
/* model --> view */
|
||||
- (void)showExtraFairwareReminder
|
||||
{
|
||||
ExtraFairwareReminder *dialog = [[ExtraFairwareReminder alloc] initWithPyRef:[model extraFairwareReminder]];
|
||||
ExtraFairwareReminder *dialog = [[ExtraFairwareReminder alloc] initWithApp:model];
|
||||
[dialog start];
|
||||
[NSApp runModalForWindow:[dialog window]];
|
||||
[dialog close];
|
||||
|
||||
@@ -8,6 +8,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "PyExtraFairwareReminder.h"
|
||||
#import "PyDupeGuru.h"
|
||||
|
||||
@interface ExtraFairwareReminder : NSWindowController
|
||||
{
|
||||
@@ -16,7 +17,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
PyExtraFairwareReminder *model;
|
||||
NSTimer *timer;
|
||||
}
|
||||
- (id)initWithPyRef:(PyObject *)aPyRef;
|
||||
- (id)initWithApp:(PyDupeGuru *)aApp;
|
||||
- (PyExtraFairwareReminder *)model;
|
||||
|
||||
- (void)start;
|
||||
|
||||
@@ -10,12 +10,12 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
#import "Utils.h"
|
||||
|
||||
@implementation ExtraFairwareReminder
|
||||
- (id)initWithPyRef:(PyObject *)aPyRef
|
||||
- (id)initWithApp:(PyDupeGuru *)aApp
|
||||
{
|
||||
self = [super initWithWindowNibName:@"ExtraFairwareReminder"];
|
||||
[self window];
|
||||
[continueButton setEnabled:NO];
|
||||
model = [[PyExtraFairwareReminder alloc] initWithModel:aPyRef];
|
||||
model = [[PyExtraFairwareReminder alloc] initWithApp:[aApp pyRef]];
|
||||
[model bindCallback:createCallback(@"ExtraFairwareReminderView", self)];
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -40,9 +40,6 @@ class PyDupeGuruBase(PyFairware):
|
||||
def directoryTree(self) -> pyref:
|
||||
return self.model.directory_tree
|
||||
|
||||
def extraFairwareReminder(self) -> pyref:
|
||||
return self.model.extra_fairware_reminder
|
||||
|
||||
def problemDialog(self) -> pyref:
|
||||
return self.model.problem_dialog
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from objp.util import dontwrap
|
||||
from objp.util import pyref, dontwrap
|
||||
from cocoa.inter import PyGUIObject
|
||||
from core.gui.extra_fairware_reminder import ExtraFairwareReminder
|
||||
|
||||
class ExtraFairwareReminderView:
|
||||
def startTimer(self): pass
|
||||
@@ -8,6 +9,10 @@ class ExtraFairwareReminderView:
|
||||
def enableButton(self): pass
|
||||
|
||||
class PyExtraFairwareReminder(PyGUIObject):
|
||||
def __init__(self, app: pyref):
|
||||
model = ExtraFairwareReminder(app.model)
|
||||
PyGUIObject.__init__(self, model)
|
||||
|
||||
def start(self):
|
||||
self.model.start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user