mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Pushed some logic for fairware from gui layers to hscommon.
This commit is contained in:
@@ -166,7 +166,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
[[self resultWindow] restoreColumnsPosition:columnsOrder widths:columnsWidth];
|
||||
else
|
||||
[[self resultWindow] resetColumnsToDefault:nil];
|
||||
[HSFairwareReminder showNagWithApp:[self py]];
|
||||
[py initialRegistrationSetup];
|
||||
[py loadSession];
|
||||
}
|
||||
|
||||
@@ -227,4 +227,14 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
{
|
||||
[Dialogs showMessage:msg];
|
||||
}
|
||||
|
||||
- (void)setupAsRegistered
|
||||
{
|
||||
// Nothing to do.
|
||||
}
|
||||
|
||||
- (void)showFairwareNag
|
||||
{
|
||||
[HSFairwareReminder showNagWithApp:[self py]];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -2,11 +2,10 @@ import logging
|
||||
|
||||
from jobprogress import job
|
||||
from hscommon import cocoa
|
||||
from hscommon.cocoa import install_exception_hook, pythonify
|
||||
from hscommon.cocoa import install_exception_hook
|
||||
from hscommon.cocoa.inter import signature, PyFairware
|
||||
from hscommon.cocoa.objcmin import (NSNotificationCenter, NSUserDefaults,
|
||||
NSSearchPathForDirectoriesInDomains, NSApplicationSupportDirectory, NSUserDomainMask,
|
||||
NSWorkspace)
|
||||
from hscommon.cocoa.objcmin import (NSNotificationCenter, NSSearchPathForDirectoriesInDomains,
|
||||
NSApplicationSupportDirectory, NSUserDomainMask, NSWorkspace)
|
||||
from hscommon.trans import tr
|
||||
|
||||
from core.app import JobType
|
||||
@@ -188,14 +187,6 @@ class PyDupeGuruBase(PyFairware):
|
||||
ud = {'desc': JOBID2TITLE[jobid], 'jobid':jobid}
|
||||
NSNotificationCenter.defaultCenter().postNotificationName_object_userInfo_('JobStarted', self, ud)
|
||||
|
||||
def get_default(self, key_name):
|
||||
raw = NSUserDefaults.standardUserDefaults().objectForKey_(key_name)
|
||||
result = pythonify(raw)
|
||||
return result
|
||||
|
||||
def set_default(self, key_name, value):
|
||||
NSUserDefaults.standardUserDefaults().setObject_forKey_(value, key_name)
|
||||
|
||||
def show_extra_fairware_reminder(self):
|
||||
self.cocoa.showExtraFairwareReminder()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user